Source: ASPCN
Author: Flying
Cookie
The use of cookies is similar to the ASP. For example, we build a cookie called aspcn, worth flying knife
Httpcookie cookie = new httpcookie ["aspcn"];
Cookie.Value = "Flying Knife";
Response.Appendcookie (cookie);
We take the cookie value is also very simple.
HTTPCOOKIE COOKIE = Request.cookies ["ASPCN"];
CookieValue = Cookie.Value;
Sometimes we want to store multiple information in a cookie, there is no problem. For example, we add multiple information in cookies called ASPCN.
Httpcookie cookie = new httpcookie ("ASPCN");
Cookie.values.Add ("Webmaster", "Flying Knife");
Cookie.values.Add ("Writer", "beige");
Cookie.values.Add ("LinkColor", "Blue");
Response.Appendcookie (cookie);
Take information is also as simple as
HTTPCOOKIE COOKIE = Request.cookies ["ASPCN"];
Value1 = cookies.values ["Webmaster"];
Value2 = cookies.values ["Writer"];
View State
This is a new Dongdong, usage and session, and his main use is to record the state of Web Control. Although it is new, it is nothing to do with Application, Session, so I don't want to explain in detail.
State ["DroploadIndex"] = 0;
Basic usage is as follows :), but remember that the information he saved can only be used in an ASPX file. After going out, this is not used because his use is just the status of the WEB control.
ASP.NET Advanced Applications
Asp.net foundation, we have already explained, but this is not the function of ASP.NET, and there are many ASP.NET new features powerful.
Web service
TRACK
globalization
Cache
Make components
Authentic control