Web用户控制回发问题 [英] Web user Control post back issue

查看:70
本文介绍了Web用户控制回发问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在创建一个包含DropDown和TreeView的Web用户控件,如果更改了在树控件中选择节点的下拉值。



页面包含< cc1:scriptmanager xmlns:cc1 =#unknown>



和web控件使用< ; asp:ToolkitScriptManager>



我收到错误只能将一个ScriptManager实例添加到页面中



如果我从Web用户控件中删除< asp:ToolkitScriptManager>那么页面会回发。





如果在更改Web用户控件中的下拉值时如何停止回发?

Hi,

I am creating a web user control which contains DropDown and TreeView if change the dropdown value the node is selected in tree control.

Page contains <cc1:scriptmanager xmlns:cc1="#unknown">

and web control use <asp:ToolkitScriptManager >

I got the error "Only one instance of a ScriptManager can be added to the page"

if I remove <asp:ToolkitScriptManager >from web user control then page is post back.


How can i stop the post back when change the dropdown value in web user control?

推荐答案

嘿saad,



因为当你将两个脚本管理器添加到同一页面时出现这个问题。

尝试检查脚本管理器应该只有一次。每页。



做一件事,从用户控件中删除脚本管理器。然后错误就会解决。







快乐编码。

happy新年。

:)

:D
hey saad,

This issue is occure because of when you add two script manager into same page.
Try to check that script manager should be once only. per page.

do one thing, remove script manager from User control. then error will fix.



Happy Coding.
happy New Year.
:)
:D


这篇关于Web用户控制回发问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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