Let's record a few common sense
The three-mesh operator a?b:c A simple way of understanding: if (A is true) {RETURNB} Else{RETURNC, where a can be a formula
Invoke API Cloud, do not use jquery Jquery.ready or JS Function.ready, directly using Api.ready log file is used to record the program, such as to a class, in the first sentence of the class plus log.xxx (), Generally write a log tool class, which has the level of judgment, for example, Info,debug,error different levels of output information call different methods, when the tool class calls, in the engineering directory to generate a log folder, log information in the form of text saved into the inside
Record a few details to be aware of doing software
(1) If the page card, you may need to increase the server bandwidth, if the user upload a picture too large will make the page card, you can limit the upload image size, if the picture is not loaded, you can first load a blank, then Ajax, and then load pictures to prevent jammed.
(2) Software user interface as much as possible to do, sometimes have to do the page temporarily can not operate to wait for loading restrictions, to prevent the current page is already stuck, the user also continue to operate, so that it becomes more card
First you need to have a routing ashx file that is responsible for receiving and processing URL parameters
This file is made up of two parts
1, the URL receives the function to write a state machine with the switch, the root different parameter calls the different method
public void ProcessRequest (HttpContext context)
{
Context. Response.ContentType = "Text/plain";//declaring return type, the server returns a paragraph (text) to the client
String para = context. Request["Para"];
Switch (para)
{
}
}
2, each state corresponds to a method, the content of the method is to manipulate the database and logical judgment, and then output string of HTML code to visit his foreground page
String html = null;
Html+=string. Format (<xxxx>);
Html+=string. Format (<xxxx>);
HttpContext.Current.Response.Write (HTML);
Then you need to have a template folder to store HTML template files and save your favorite HTML inside
Loading a template using the {include:/template/xxx.html} method
A portal file index.aspx or default.aspx
Inside generally only Response.Redirect ("xxx.aspx?para1=xx¶2=xx"); Jump to an ASPX page and do some processing, home main navigation and main frame
Then, according to the different parameters Ajax access to the previous ashx file, get different HTML to the page asynchronous update