HttpCookie uid = new HttpCookie( "username", 用户.用户名);
Response.Cookies.Add( uid );
HttpCookie upwd = new HttpCookie( "userPWD", 用户.密码 );
Response.Cookies.Add( upwd );
Response.Cookies.Add( uid );
HttpCookie upwd = new HttpCookie( "userPWD", 用户.密码 );
Response.Cookies.Add( upwd );
你写的,我不明白,
在Temporary Internet Files看到是这样的
我就是不明白怎么文件的名称是Cookies:[email protected]
到底是怎么写出来的。。 名称 Cookies:[email protected] internet地址 Cookies:[email protected]
"ok100.alleys.com" is a site you visited, right?
that is how the browser named the cookie filesif CSDN puts a cookie on your machine, the cookie file will be probably named as [email protected]
cookie.expires=10
That is Right.But How to Use C# to Do It,I Understand the cookie which write to the local machin.
In my mind , what can i do like that write the cookie to the local machine like Cookies:[email protected] .
Who Can Give Me the Code?? Waiting Online!!!
No, U miss my means.
I want to use C# Write Cookies, but I do't understand How to write the cookies code.
like under code , it can write the cookie to the client side
Code Example:
HttpCookie cookie = new HttpCookie("strCookieName");
//Set the cookies value
cookie.Value = "ValueField.Text";
Response.Cookies.Add(cookie);
cookie.Domain="www.alleys.com";
cookie.Path = "/tt";
But The Result is Cookies file Name is "/tt"
I Want The Result is
名称 Cookies:[email protected]
What Can I Do !! waiting online!
in my browser, i run the code but it is no what u say
the cookies file in my machine 'name is "/tt"
that make me two week to do it, but it no way to make it true.
give me mind??
cookie.values.Add("branch", dropBranch.SelectedItem.Value) cookie.Expires = DateTime.MaxValue
Response.AppendCookie(cookie)
your method is only to add cookies, but my question is how to make a cookie file name to be which u like control it...
http://expert.csdn.net/Expert/topic/1082/1082426.xml?temp=.6507837