【问题标题】:Setting multiple events in one ext.net button在一个 ext.net 按钮中设置多个事件
【发布时间】:2015-06-08 12:17:37
【问题描述】:

我有一个带有一些网格和字段的表单。当我点击提交按钮时,我需要发送所有信息做数据库。之后,我需要重定向到其他页面。实际上,我的代码是这样显示的,但是重定向事件没有触发。

<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>

还有事件:

protected void DirectGeraDocumento(object sender, DirectEventArgs e) {
    Context.Response.Redirect("GeraDocumento.aspx");    
}

【问题讨论】:

  • 我知道事件的名称不同。我只在帖子中更改。

标签: javascript events extjs ext.net


【解决方案1】:

问题暂时解决了。它正在工作,但我不确定 timeout 的功能,为什么这将取决于服务器响应时间。如果有人知道更好的方法,我会很感激。谢谢!

<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>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-19
    相关资源
    最近更新 更多