Generally, when a message similar to msgbox is displayed on the webpage, the background page is white, which looks uncomfortable.
For example:
How can this problem be solved?
Javascript statements can be written in the Post-code of asp.net to prevent the background from becoming white.
[Csharp] view plaincopyprint?
If (code! = RightCode)
{
Page. ClientScript. RegisterStartupScript (Page. GetType (), "message", "<script language = 'javascript 'defer> alert ('verification code is incorrect. Please enter it again! '); </Script> ");
Return;
}
If (code! = RightCode)
{
Page. ClientScript. RegisterStartupScript (Page. GetType (), "message", "<script language = 'javascript 'defer> alert ('verification code is incorrect. Please enter it again! '); </Script> ");
Return;
}
Specifically:
[Html] view plaincopyprint?
Page. ClientScript. RegisterStartupScript (Page. GetType (), "message", "<script language = 'javascript 'defer> alert ('verification code is incorrect. Please enter it again! '); </Script> ");
Page. ClientScript. RegisterStartupScript (Page. GetType (), "message", "<script language = 'javascript 'defer> alert ('verification code is incorrect. Please enter it again! '); </Script> ");
The result is as follows:
From jarin's column