ASP.NETÒ³Ãæ´«Öµ_µÚÆßƪ_HiddenField
+++ HiddenField01.aspxÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:HiddenField ID="HiddenField2" runat="server" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
++ ºǫ́´úÂ룬ÈçÏ£º
protected void Button1_Click(object sender, EventArgs e)
{
HiddenField1.Value = "liuning";
HiddenField2.Value = "liuning@hotmail.com";
string strUrl = "HiddenField02.asp?name=" +
HiddenField1.Value.ToString() + "&email=" + HiddenField2.Value.ToString();
Response.Redirect(strUrl);
}
+++ HiddenField02.aspxÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
(ÂÔ)
++ ºǫ́´úÂ룬ÈçÏ£º
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["name"] != null && Request.QueryString["email"] != null)
{
Response.Write("ÐÕÃû£º" + Request.QueryString["name"].ToString() + "</br>" +
"µç×ÓÓʼþ£º" + Request.QueryString["email"].ToString());
}
}
+++ ˵Ã÷
(1) ÕâÖÖ·½Ê½Ò²ºÜ³£Ó㬱ÈÈ磬ÄãÏ뽫Óû§µÄµÇ¼ÐÅϢдÈëµ½Êý¾Ý¿âÖУ¬ÈçµÇ¼Óû§Ãû¡¢µÇ¼ʱ¼ä¡¢IPµØÖ·ºÍMACµØÖ·µÈµÈ¡£ÄÇô£¬ÄãÓ¦¸Ãд½Å±¾»ñµÃ¿Í»§¶ËµÄIPµØÖ·ºÍMACµØÖ·£¬È»ºó°ÑIPµØÖ·ºÍMACµØÖ··Åµ½HiddenField¿Ø¼þ£¬Èúǫ́´úÂë´¦Àí¡£
Ïà¹ØÎĵµ£º
Ò»£¬Ç°ÑÔ
CookiesÏë±ØËùÓÐÈ˶¼Á˽⣬ µ«ÊÇδ±ØËùÓÐÈ˶¼¾«Í¨¡£±¾ÎĽ²½âÁËCookiesµÄ¸÷·½Ãæ֪ʶ£¬ ²¢ÇÒÌá³öÀ´ÁË×î¼Ñʵ¼ù¡£ÕâÊDZÊÕßÔÚÈÕ³£¹¤×÷ÖеĻýÀۺͳÁµí¡£
¶þ£¬»ù´¡ÖªÊ¶
1.ʲôÊÇCookies
Cookie ÊÇһС¶ÎÎı¾ÐÅÏ¢£¬°éËæ×ÅÓû§ÇëÇóºÍÒ³ÃæÔÚ Web ·þÎñÆ÷ºÍä¯ÀÀÆ÷Ö®¼ä´«µÝ¡£Cookie °üº¬Ã¿´ÎÓû§·ÃÎÊÕ¾µãʱ Web Ó¦ÓóÌÐò¶¼¿ ......
WebBrowser¿Ø¼þ ´òÓ¡2
WebBrowserÊÇIEÄÚÖõÄä¯ÀÀÆ÷¿Ø¼þ£¬ÎÞÐèÓû§ÏÂÔØ.
Ò»¡¢WebBrowser¿Ø¼þ
¡¡¡¡<object ID='WebBrowser' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>
¶þ¡¢WebBrowder¿Ø¼þµÄ·½·¨
//´òÓ¡
WebBrowser1.ExecWB(6,1);
//´òÓ¡ÉèÖÃ
WebBrowser ......
HttpContext.Current.Request.Url.ToString() ²¢²»¿É¿¿¡£
Èç¹ûµ±Ç°URLΪ
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
ͨ¹ýHttpContext.Current.Request.Url.ToString()»ñÈ¡µ½µÄÈ´ÊÇ
http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=¼&fra ......
+++ ÐÞ¸ÄGlobal.asaxÎļþ£º
<%@ Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
Application["count"] = 0;
}
void Application_End(object sender, EventArgs e)
{ }
void Application_Error(object sender, EventArgs ......
+++ Cookie01.aspxÒ³Ãæ
++ Ò³Ãæ´úÂëÈçÏ£º
<asp:TextBox ID="TextBox1" runat="server" ForeColor="Red" Width="182px">Name</asp:TextBox>
<asp:Button ID="BtnCookie" runat="server" OnClick="BtnCookie_Click" Text="BtnCookie" /><br />
++ ºǫ́´úÂëÈçÏ£º
protected void BtnCookie_Cl ......