Considerations (Real-time update)

Source: Internet
Author: User
1 . Try {} Catch {} Statements
In try {} Catch {} Catch {} Do not use response. Redirect ();
Response. Write ( " <SCRIPT> alert ('error! ') </SCRIPT> " ); Statement, or use
Try (Exception E)
{
Response. Write ("<SCRIPT> alert ('"+Ex. Message+"') </SCRIPT>"
}

2 . Static
  Private   Static   Int I = 0 ;
Private   Int I = 0 '
If there is static, the operation results will be retained. Computation results are not retained without static.

3 . Notes for rangevalidator:
If the type in the attribute is set to string type, the value of maximumvalue and minimumvalue can only be set to a single letter, not a number, and the two values are not set to letters, the two locations are only the first letter. When running, you only need to check whether the first letter in the text box is within the range, regardless of the letter or number.

4 . Difference Between sqldatareader and sqldataadapter:
Sqldatareader is suitable for reading data from a single row and displaying data from one row with multiple controls. Sqldatareader is a form of reading data streams and may lose the first row of data.

Sqldataadapter copies the entire table. Data will not be lost.
5 . Adapter can take cells, and the entire table
Reader retrieves a row

6 . Close the window
This . Btnclose. Attributes. Add ( " Onclick " , " Window. Close () " );

7 . To bind a datalist, remember to add ( ! Ispostback)

8 . When setting properties, use public.

9 . Change the file name. Change the class name.

10 . It is best not to use Chinese characters for transferring values between pages, which is prone to errors.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.