today, I encountered a small problem on the book management page of the book purchasing network. About user input verification: Use. the verification control of net can implement more user input verification, but the prompt information output is not very flexible, so try to Display Error information with Div mark in a conspicuous place on the page. the page form contains three textbox controls and one imagebutton control. The javascript Code is as follows:
the master page is used, in the environment edited by vs2005, the Control ID is not a real ID. After the output is HTML code, some characters are automatically added before the ID, therefore, you need to copy the Control ID in the browser to obtain the real control id
the CS file code on the page is as follows:
protected void page_load (Object sender, eventargs e)
{< br> textbox1.attributes. add ("onblur", "Return check ('" + textbox1.clientid + "', 'author is blank! '); ");
textbox2.attributes. Add (" onblur "," Return check (' "+ textbox2.clientid +" ', 'The title is blank! '); ");
textbox3.attributes. Add (" onblur "," Return check (' "+ textbox3.clientid +" ',' press is blank! '); ");
}