A Method for prompting incorrect page data input
Not very good, but it can be used. Used to verify user input data and give appropriate prompts. For example, an integer indicating the date and time. If the user input is incorrect, the user must be prompted.
Aspx webpage
<Table cellspacing = "0" cellpadding = "0" width = "100%" border = "0" Height = "10" bgcolor = "# ffffff">
<Tr>
<TD style = "height: 10px">
<Span id = "spanmessage" runat = "server"> </span>
</TD>
</Tr>
</Table>
BackgroundCode
For example, perform an operation.
Bool ret = Update (entity );
If (ret = true)
Spanmessage. innerhtml = gettips ("Update Project tracker successfully ");
Else
Spanmessage. innerhtml = gettips ("Update Project tracker failed ");
The gettips method is as follows:
Public static string gettips (string Tips)
{
Return string. Format ("<font color = \ 'Red \ '> {0}. </font> <br/>", tips );
}
OK. Close.