_do发回特定的UpdatePanel不起作用 [英] _do Post back specific UpdatePanel is not working
本文介绍了_do发回特定的UpdatePanel不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在执行以下代码时整个页面正在刷新而不是UpdatePanel
< script type = text / javascript >
$(function(){
$('#<% = txtItemCode.ClientID < span class =code-pagedirective>%> ')。focusout(function(){
__doPostBack('#<% = UpdatePanel2.ClientID %> ','');
});
});
< / script >
帮助我如果有人知道
谢谢
解决方案
(function(){
('#<% = txtItemCode.ClientID %> ')。focusout(function(){
__doPostBack('#<% = UpdatePanel2.ClientID %> ','');
});
});
< / script >
帮助我如果有人知道
谢谢
您可以在UpdatePanel中使用AsyncPostBackTrigger来执行此操作。
尝试这样的事情: -
没有任何隐藏按钮; -
__ doPostBack('<%= UpdatePanel1.ClientID%>',null);
或隐藏按钮: -
< asp:UpdatePanel ID = UpdatePanel1 runat = server >
< ContentTemplate < span class =code-keyword>>
< / ContentTemplate >
< 触发器 >
< asp:AsyncPostBackTrigger ControlID = ReloadThePanel EventName < span class =code-keyword> = 点击 / >
< / Triggers >
< / asp:UpdatePanel >
< asp:按钮 ID = ReloadThePanel runat = server style = display:none; / >
当你想要面板t时o更新,你只需要打电话:
__ doPostBack('<%= ReloadThePanel.ClientID%>',null);
While doing below code Entire page is refreshing Instead of UpdatePanel
<script type="text/javascript">
$(function () {
$('#<%=txtItemCode.ClientID %>').focusout(function () {
__doPostBack('#<%=UpdatePanel2.ClientID %>', '');
});
});
</script>
Help me If any one know
Thanks
解决方案
(function () {
('#<%=txtItemCode.ClientID %>').focusout(function () { __doPostBack('#<%=UpdatePanel2.ClientID %>', ''); }); }); </script>
Help me If any one know
Thanks
You can use an AsyncPostBackTrigger with the UpdatePanel to do this.
try some thing like this:-
without any hidden button;-
__doPostBack('<%=UpdatePanel1.ClientID %>', null);
or with hidden button:-
<asp:UpdatePanel ID="UpdatePanel1" runat="server" > <ContentTemplate> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ReloadThePanel" EventName="Click" /> </Triggers> </asp:UpdatePanel> <asp:Button ID="ReloadThePanel" runat="server" style="display:none;" />
When you want the panel to be updated, you just need to call:
__doPostBack('<%=ReloadThePanel.ClientID %>', null);
这篇关于_do发回特定的UpdatePanel不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文