日期:2014-05-19  浏览次数:20409 次

Gridview 控件模板中,怎么使用ScriptManager??
用户控件里有用到
<atlas:ScriptManager   ID= "ScriptManager1 "   runat= "server "   EnablePartialRendering= "True ">
<atlas:UpdatePanel   ID= "UpdatePanel1 "   runat= "server ">
                                <ContentTemplate>
                                        &nbsp; <asp:DropDownList   ID= "DropDownList2 "   runat= "server ">
                                        </asp:DropDownList>
                                </ContentTemplate>
                                <Triggers>
                                        <atlas:ControlEventTrigger   ControlID= "DropDownList1 "   EventName= "SelectedIndexChanged "   />
                                </Triggers>
                        </atlas:UpdatePanel>

现在我把这个用户控件直接拖到aspx页面里的GridView控件中的模板里,一运行出错,请问题怎么解决?
Only   one   instance   of   a   ScriptManager   can   be   added   to   the   page.

------解决方案--------------------
up
------解决方案--------------------
Gridview 控件模板中用 <asp:ScriptManagerProxy runat= "server "> </asp:ScriptManagerProxy>
------解决方案--------------------
有一个scriptmanager就可以了,如果非要用就用scriptmanagerpeoxy.
------解决方案--------------------
有一个ScriptManager为什么还要在模版里用。。。
------解决方案--------------------
一个页面有且只能有一个ScriptManager,用户控件中有了,就不要再加了。
------解决方案--------------------
删除。只有页面需要写它。