Asp.net Basics

Source: Internet
Author: User

I. Dynamic and Static webpages
At first, we thought that a dynamic webpage is a webpage with flash, while a static webpage is a non-dynamic webpage. It seems that this understanding is wrong, and it is a big mistake. The so-called dynamic web page actually refers to the interaction between the web page and the server, the data in the server has changed, and the data displayed on the web page has also changed. This is the real "dynamic ". Static web pages are relative to dynamic web pages. To put it simply, they are dead web pages. Even if flash exists on your web page, as long as it has nothing to do with the server, it is also a static Web page.

Ii. Important Event in asp.net -- Page_Load event
Similar to the Form_Load event in the C/S system, the Page_Load event is triggered when the page is loaded, but it is not required for the Form_Load event in the C/S system, the Page_Load event will also be hit when the webpage is sent back. In this case, the IsPostBack attribute is involved. The function of this attribute is to determine whether the. aspx page is a sending back page. If yes, true is returned. If the page is loaded for the first time, false is returned.

Iii. Several important objects in asp.net
1. Request object
I will not repeat the official explanation. I emphasize that this object is used for the information in the request sent from the browser to the server.
2. Response object
In contrast to the Request object, the Response object is used to send data from the server back to the browser.
3. Session Object
This object has been used in the niugu news publishing system. It is used to store information of specific users between multiple page calls. The information in this object is released only when the browser is closed.
4. Application Object
Similar to the Session object, the Application object is a collection object, which stores the object type. Therefore, data type conversion is required for reading data.

Iv. asp.net controls
1. HTML server controls
It encapsulates standard client controls into classes, which are located in the System. web. UI. in the HtmlControls namespace, they inherit from HtmlControls. In fact, when any standard client control is added with the runat = server property, these client controls are converted into HTML server controls, then we can process these controls in the post code.
2. Web server controls
The Web server control is located in the namespace System. Web. UI. WebControls. All Web server controls are derived from WebControls. The client code output by many Web server controls is complex. Web server controls always start with asp.
3. Verify the control
In the ASP era, users are not prevented from entering error data at will. A large amount of javascript code is usually required to prevent errors on the client in advance. Therefore, most verification controls are completed on the client. Of course, you can also define the server verification method. The verification controls are located in the System. Web. UI. Webcontrols namespace. They are derived from the BaseValidtor base class. Www.2cto.com
4. complex controls:
These controls are in the category of Web server controls. They have more advanced performance and features, and generate a large number of HTML tags and JavaScript scripts to create user interfaces, such as the Calendar control, AadRotator, and TreeView control.


Author: xiaoduishenghuogo

Related Article

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.