在页面中调用Ajaxified用户控件 [英] Call an Ajaxified user control in a page
本文介绍了在页面中调用Ajaxified用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我的问题是我有一个Ajaxified用户控件,我想调用
和其他页面(由ajax提供).我做到了,我可以叫它,但是控件事件不起作用
Hello
my problem is that i have a user control which is Ajaxified , and i wanna call into
and other page by ajax. i did it, i can call it but the controls events does''nt work
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<p>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</p>
<p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline"
ChildrenAsTriggers="False" UpdateMode="Conditional">
<contenttemplate>
<table class="style1">
<tr>
<td height="100">
<table class="style1" dir="rtl">
<tr>
<td>
<asp:ImageButton ID="ImageButton2" runat="server" Height="50px"
ImageUrl="~/PicWeb/uploadPic.png" />
</td>
<td>
<asp:ImageButton ID="btnInsertMob" runat="server"
Height="50px" ImageUrl="~/PicWeb/InsertMob.png"
onclick="ImageButton1_Click" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100">
<asp:PlaceHolder ID="PlaceHolder1" runat="server">
</td>
</tr>
</table>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="btnInsertMob" EventName="Click" />
</triggers>
</p>
这是必须调用control
this is the main page which have to call the control
推荐答案
的主页.您不能从Ajax调用"到另一个页面.您可以调用具有WebMethod属性但不属于页面开头的静态方法.
You can''t "call" into another page from Ajax. You can call static methods that have the WebMethod attribute but then are not part of the page to begin with.
这篇关于在页面中调用Ajaxified用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文