JasonBie

2012年4月12日

Session State

摘要: A Session State ExamplepublicclassFurniture{publicstringName;publicstringDescription;publicdecimalCost;publicFurniture(stringname,stringdescription,decimalcost){Name=name;Description=description;Cost=cost;}}publicpartialclassSessionStateExample:System.Web.UI.Page{protectedvoidPage_Load(Objectsender, 阅读全文

posted @ 2012-04-12 16:57 JasonBie 阅读(251) 评论(0) 推荐(0) 编辑

Cookie

摘要: Before you can use cookies, you should import the System.Net namespace so you can easily workwith the appropriate types:usingSystem.Net;Cookies are fairly easy to use. Both the Request and Response objects (which are provided throughPage properties) provide a Cookies collection. The important trick 阅读全文

posted @ 2012-04-12 15:24 JasonBie 阅读(157) 评论(0) 推荐(0) 编辑

Transferring Information Between Pages

摘要: Transferring Information Between PagesCorss-Page PostingHere’s an example—a page named CrossPage1.aspx that defines a form with two text boxes and a button. When the button is clicked, it posts to a page named CrossPage2.aspx.<%@PageLanguage="C#"AutoEventWireup="true"CodeFile= 阅读全文

posted @ 2012-04-12 13:58 JasonBie 阅读(248) 评论(0) 推荐(0) 编辑

View State

摘要: A View State ExamplepublicpartialclassSimpleCounter:System.Web.UI.Page{protectedvoidcmdIncrement_Click(Objectsender,EventArgse){intcounter;if(ViewState["Counter"]==null){counter=1;}else{counter=(int)ViewState["Counter"]+1;}ViewState["Counter"]=counter;lblCount.Text=&quo 阅读全文

posted @ 2012-04-12 10:42 JasonBie 阅读(162) 评论(0) 推荐(0) 编辑

导航