如何使触发器与uploadpanel内的按钮一起使用 [英] How to make triggers works with button inside uploadpanel
问题描述
我使用更新面板更新页面的部分内容并非全部。但是,更新面板内的按钮停止工作,此按钮将数据插入数据库
请帮助
我尝试过:
< asp:ScriptManager ID =ScriptManager1runat =server />
< asp:UpdatePanel ID =UpdatePanel1runat =server>
< contenttemplate>
。
。
。其他代码行
。
。
< asp:Button ID =btnUploadrunat =serverText =UploadonClick =UploadValidationGroup =Click/>
< triggers>
< asp:AsyncPostBackTrigger ControlID =btnIdeaEventName =Click/>
I have use update panel to update partial of the page not all. However, the button inside update panel stops working and this button inserts data to database
please help
What I have tried:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
.
.
. other lines of the code
.
.
<asp:Button ID="btnUpload" runat="server" Text="Upload" onClick="Upload" ValidationGroup="Click"/>
<triggers>
<asp:AsyncPostBackTrigger ControlID="btnIdea" EventName="Click" />
推荐答案
如果您指的是btnUpload,那么您应该将其用作AsycPostBackTrigger的ControlID:
If you are referring to your btnUpload, then you should use that as the ControlID for your AsycPostBackTrigger:
<asp:asyncpostbacktrigger controlid="btnUpload" eventname="Click" />
此外,请确保验证成功,因为您要为btnUpload设置ValidationGroup。
Also, make sure that validation is successful because you are setting ValidationGroup for your btnUpload.
这篇关于如何使触发器与uploadpanel内的按钮一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!