When response. Write () is used in the pop-up Prompt window, the style of the original page will not work.
Use:
Clientscript. registerclientscriptblock (GetType (), "_ error", "<script language = JavaScript> window. Alert ('asd ') </SCRIPT> ");
// Write a method for multiple calls:
Public static void alert (page, string MSG)
{
Page. clientscript. registerclientscriptblock (GetType (), "_ error", "<script language = JavaScript> window. alert ('"+ MSG +"') </SCRIPT> ");
}
Call method:
Page
Your class. Alert (this. Page, "Login successful ");
// Note: You need to handle the 'in MSG because you use the original response. Write ()..
You can use the following method:
Clientscript. registerstartupscript (this. GetType (), "", "<SCRIPT> alert ('xxx'); </SCRIPT> ");
Do not use "response. Write ()"
Use "clientscript. registerstartupscript (this. GetType ()," "," <SCRIPT> alert ('xxx'); </SCRIPT> ");"
After resolving the page pop-up window, the page style changes