开发者

Refresh page after Message box in ASP.NET using C# RSS

Hey guys On submit button i am using the below script to display messagebox in the webpage :

ClientScript.Regi开发者_高级运维sterStartupScript(this.GetType(), "Alert", "alert('Wrong verification code');", true);

I want to refresh the page after pressing ok button in this messagebox i.e. all controls should go blank.

Please do help me in this.


Use window.location.reload()

Try this:

ClientScript.RegisterStartupScript
(
    this.GetType(), 
    "Alert", 
    "alert('Wrong verification code'); window.location.reload();",
    true
);


Call server side event after alert message like:

document.getElementById('ctl00_MainContentContainer_ticket1_YesBtn').click();

It will take you on code behind page.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜