按钮单击后,模态弹出窗口消失,导致asp.net中的回发

时间:2015-12-16 08:57:54

标签: asp.net

我想在点击按钮后显示模式弹出窗口,导致回发。 我有以下代码:

Page_Load(object sender, EventArgs e)
{
ScriptManager.RegisterPostBackControl(mybutton);
}

mybutton_Click(object sender, EventArgs e)
{
// some code that needs postback

// after postback I want to show modal popup

var script = "$('#modalName').modal('show');";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "ModalScript", script, true);
}

弹出窗口没有显示,如何克服这个问题?

0 个答案:

没有答案