如何禁用treeview aoutopostback [英] how do I disable treeview aoutopostback

查看:170
本文介绍了如何禁用treeview aoutopostback的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在masterpage中有一个树视图。根据选择的节点,变量传递给页面并基于此变量,页面内容被更改。但是选择一个节点,主页是重新加载,树视图显示在第一个状态。

如何禁用树视图的后视图?

解决方案

< blockquote>我们可以将'NavigateUrl'设置为值'javascript:void(0)'以避免回发如下: -



 <   asp:treenode     text   = 项目1.1    navigateurl   =  javascript:void(0)    xmlns:asp   = #unknown >  <   / asp:treenode  >  





但不确定您是否正在处理其点击以将变量的值传递给页面,这也可能会受到影响。在这种情况下,您可以使用将值设置为隐藏字段并可以使用它。



希望这将有助于继续进行。

如果您需要任何进一步的帮助,请告诉我。


I have a treeview in masterpage.according to what node is selected, a variable pass to a page and based this variable ,the content of page is changed. but whit select of a node, the masterpage is reload and treeview shown in first state.
how do I disable aoutopostback of a treeview?

解决方案

We can set 'NavigateUrl' to value 'javascript:void(0)' to avoid the postback as below :-

<asp:treenode text="Item 1.1" navigateurl="javascript:void(0)" xmlns:asp="#unknown"></asp:treenode>



But not sure if you are handling its click to pass the value for the variable to page, which also might be affected. In this case you can use to set value to hidden field and can use it.

Hope this will be of help to proceed further.
Please let me know if any further help you need on this.


这篇关于如何禁用treeview aoutopostback的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆