Some time ago, I saw a high-hand handwriting Effect of pure css + js in the garden. I combined it with the asp.net verification control, use this highly handwritten effect as a prompt for asp.net's difficult controls. For example
Compared with the previous write operations, this write operation is more convenient. as long as each page inherits the BasePage, the Validator folder is a required folder.
Code
Copy codeThe Code is as follows:
Namespace ValidatorTest
{
Public partial class Default: <SPAN style = "COLOR: # ff00ff"> WebApp. BasePage </SPAN>
{
Protected void Page_Load (object sender, EventArgs e)
{
}
Protected void btnSubmit_Click (object sender, EventArgs e)
{
String url = Request. Url. LocalPath;
If (! Page. IsValid)
{
StringUtil. JAlertToRedirect ("illegal submission! ", Url );
Return;
}
StringUtil. JAlertToRedirect ("thank you for testing! ", Url );
}
}
}
Download example