Set personalized, fault-tolerant prompt window in the web program

xiaoxiao2021-03-06  52

Firstly, a window image of a fault-tolerant prompt is as follows:

The key HTML text is as follows:

"Cause: <% = content [int32.parse (Request.QueryString ["])]%> <% = content [INT32.PARS (Request.QueryString ["MS"])]%> "

Then add it in the code editing window:

Public class webform1: system.Web.ui.page {public string [] content; private void, system.eventargs e) {content = new string [10]; content [1] = ". Tip 1." Content [2] = "Tip 2"; ...

}

===================================================

Call this in a fault-tolerant web page:

[/ * The following is an example! * /]

Public void check () {// Detect user input legality; // detection [order number] [type] is blank; if (lordername.innertext.trim () == "|| Lordercategory.innertext.trim == "") {response.redirect (@ "../ exceptions.aspx? Ms = 11");} // determine if the number of users entered is correct; try {INT I = Convert.Toint16 (tbquantity.text) ; If (i == 0) {response.redirect (@ "../ Exceptions.aspx? Ms = 12");}}} catch {response.redirect (@ "./ excfeptions.aspx? Ms = 12") } // The date is correct; try {convert.todatetime (tbterm.text);} catch {response.redirect (@ "./ excEptions.aspx? Ms = 9");} // judgment the delivery period must Big than the opening date; if (convert.todatetime (tbterm.text) Convert.Toint32 (lbupper.innertext)) {response.redirect (@ "../ eXceptions.aspx? Ms = 18");}}} ======== ==================================

转载请注明原文地址:https://www.9cbs.com/read-117986.html

New Post(0)