QueryString,cookie,Session

      QueryString:页面与页面之间的参数发送.
      提交:

Response.Redirect("ErrorPage.aspx?Message=Your user name is missing.");

     接收:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {  
            ErrorMessageLabel.Text = Request.QueryString["Message"];          
        }
    }

    也可以用 Request.Params["对象名字"]来获取,不过好象要先判断对象是否存在的。

     cookie:在用户的本地电脑,浏览器关闭后,在存在期限和没被清空前,始终存在。
     写入:
     要先添加引用:

using System.Net;

    然后再去写入:

你可能感兴趣的:(.net,浏览器)