HI ALL,
Below is my code which closes popup window on page load also i want to show the user a message box plz login.. well my popup window gets close but it flickers on the screen is there any way to prevent that.
StringBuilder sb = new StringBuilder();
sb.Append("
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "test", sb.ToString(), false);
MessageBox.Show("Please Sign In first...", "Login Message", MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
Any Help,
Appreciated.
Regards
Kailash kute
Loading
Amit ChoudharyPosted Jul 20, 2011, 5:53 AM
Seems like you are using windows MessageBox control in web application. I don't suggest this, its better you use Client script to show the message box. cause when you host this on webserver and access this app on other machine the message boxes will no appear.
for showing client message box use below code:
Page.ClientScript.RegisterStartupScript("onload", "");
Hope this helped you.
Thanks.