[英]Setting multiple events in one ext.net button
I have a form with some grids and fields. 我有一个带有一些网格和字段的表格。 When I click on submit button, I need to send all information do database.
当我点击提交按钮时,我需要发送所有信息做数据库。 After that, I need to redirect to other page.
之后,我需要重定向到其他页面。 Actually, my code appears as so, but the redirect event is not firing.
实际上,我的代码按原样显示,但是重定向事件未触发。
<ext:Button runat="server" Text="Finalizar" Width="150" ID="Button1" Disabled="true" >
<DirectEvents>
<Click OnEvent="SalvarDados"
Success="
#{Store1}.sync();
#{Store2}.sync();
#{Store3}.sync();
#{Store4}.sync();
#{Store5}.sync();
#{Store6}.sync();
#{Store7}.sync();
#{Store8}.sync();
RedirectPageEvent;">
<Confirmation ConfirmRequest="true" Title="Confirmação" Message="Confirm?" />
<EventMask ShowMask="true" Msg="Salvando..." />
</Click>
</DirectEvents>
</ext:Button>
And the event: 和事件:
protected void DirectGeraDocumento(object sender, DirectEventArgs e) {
Context.Response.Redirect("GeraDocumento.aspx");
}
Problem solved provisionally . 问题暂时解决。 It's working , but I'm not sure about the functioning of the timeout , why this will depend on the server response time.
它正在工作,但是我不确定超时的功能,这为什么取决于服务器响应时间。 If someone knows a better way, I will apreciate.
如果有人知道更好的方法,我将不胜感激。 Thanks!
谢谢!
<Click OnEvent="SalvarDados"
Success="
#{Store1}.sync();
#{Store2}.sync();
#{Store3}.sync();
#{Store4}.sync();
#{Store5}.sync();
#{Store6}.sync();
#{Store7}.sync();
#{Store8}.sync();
setTimeout(function(){ location.assign('GeraDocumento.aspx'); }, 1500);">
<Confirmation ConfirmRequest="true" Title="Confirmação" Message="Confirm?" />
<EventMask ShowMask="true" Msg="Salvando..." />
</Click>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.