Response.Cookies["myPath"].Value=Server.MapPath(".");
Response.Cookies["myPath"].Expires = DateTime.Now.AddDays(1);

解决方案 »

  1.   

    System.Web.HttpCookie newcookie = new HttpCookie("user");
    newcookie.Values["path"] = "";
    newcookie.Expires = DateTime.Now.AddDays(1);
    Response.AppendCookie(newcookie);
    路径Request.RawUrl
    Request.Url.AbsoluteUri
      

  2.   

    你可以不用COOKLIE..建议你用STRUCT..这个比较强大。。
      

  3.   

    哎,我新手上路。问题太多了。。都不知道怎么解决谁告诉我下如何获取当前页面的URL地址
      

  4.   

    再请教高手们一个问题。。我要判断SESSION是否过期了。该怎么写
      

  5.   

    if(Session["User"]==null)
    {
    ...
    }