Some small knowledge points in ASP. NET

Source: Internet
Author: User

In actual programming, there will always be such a problem. Watching the old birds play freely in front of their computers, cainiao like me can only learn from each other over time ~

1. ispostback is an attribute of the bool type in the page class. It is used to determine whether the current form request is the first or not the first request. When ispostback = true, it indicates not the first request, which is called PostBack. When ispostback = false, it indicates the first request. There are many scenarios in the Asp.net framework that need to judge ispostback. operations such as loadallstate must be performed during PostBack. When we use webform for development, we often judge ispostback in page_load, because page_load is executed in the first request and page_load is executed in non-first request. Why do I have multiple requests for the same form? Asp.net introduces server-side events. controls that support server-side events will send requests to the current form. In this way, in many cases, we need to determine whether it is the first request to this form.

2. One sqlconnection can only open one datareader. When enabling another datareader, you must close the previous one first.


 

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.