Write javascript statements in the Post-code of asp.net to prevent the background of the prompt box from becoming white.

Source: Internet
Author: User

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
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.