开发者

Popup after updatepanel postback is blocked by popup block

开发者 https://www.devze.com 2023-01-21 15:44 出处:网络
I make a polling and want to popup the result immediately by window.open function after partial postback (updatepanel). But the popup is blocked by popup blocker. How can I fix it?

I make a polling and want to popup the result immediately by window.open function after partial postback (updatepanel). But the popup is blocked by popup blocker. How can I fix it?

Here is 开发者_StackOverflow中文版my code:

protected void btnPollingSubmit_OnClick (object sender, EventArgs e)
{
    UpdatePolling();
}

protected void UpdatePolling()
{
   // update the polling result
     ...
     ...

 ScriptManager.RegisterStartupScript(btnPollingSubmit, this.GetType(), "PollingResult", "window.open('polling-result.aspx','','width=200,height=100'), true);   

}


Don't use a popup but a Div positioned on top of the mainpage. Or even better and easier: use one of these "modal popups" from jQuery: best 22 jQuery modal popup plugins

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号