cooike problem
-
hi friends i need to create the cookie in domain name.. For example: my cookie file named as "administrator@localhost.txt" but i need to create "administrator@mydomainname.txt" i tried like this Dim objcookies As HttpCookie = New HttpCookie("SalesLogin") objcookies.Domain="www.mydomain.com" but it is not created... can any one help me?
Known Is Drop.Unknown Is Ocean
-
hi friends i need to create the cookie in domain name.. For example: my cookie file named as "administrator@localhost.txt" but i need to create "administrator@mydomainname.txt" i tried like this Dim objcookies As HttpCookie = New HttpCookie("SalesLogin") objcookies.Domain="www.mydomain.com" but it is not created... can any one help me?
Known Is Drop.Unknown Is Ocean
Following is way to create cookie in asp.net 1.HttpCookie objCookie = new HttpCookie(cookiename); 2.Response.Cookies.Add(objCookie); 3.objCookie.Values.Add(cookiename,cookievalue); i think you forget second line of the code which add cookie to respose
-
Following is way to create cookie in asp.net 1.HttpCookie objCookie = new HttpCookie(cookiename); 2.Response.Cookies.Add(objCookie); 3.objCookie.Values.Add(cookiename,cookievalue); i think you forget second line of the code which add cookie to respose
thanks for reply Dim objcookies As HttpCookie = New HttpCookie("SalesLogin") objcookies.Domain = Request.ServerVariables("HTTP_HOST") objcookies.Secure = True objcookies.Values.Add("AdminType", Session("AdminType")) objcookies.Values.Add("AdminId", Session("AdminId")) objcookies.Expires = DateTime.Now.AddDays(1) Response.Cookies.Add(objcookies) thisis my code
Known Is Drop.Unknown Is Ocean
-
thanks for reply Dim objcookies As HttpCookie = New HttpCookie("SalesLogin") objcookies.Domain = Request.ServerVariables("HTTP_HOST") objcookies.Secure = True objcookies.Values.Add("AdminType", Session("AdminType")) objcookies.Values.Add("AdminId", Session("AdminId")) objcookies.Expires = DateTime.Now.AddDays(1) Response.Cookies.Add(objcookies) thisis my code
Known Is Drop.Unknown Is Ocean
chek bwlow link hope this will do some work for you http://forums.asp.net/p/1242647/2275159.aspx#2275159[^]
-
hi friends i need to create the cookie in domain name.. For example: my cookie file named as "administrator@localhost.txt" but i need to create "administrator@mydomainname.txt" i tried like this Dim objcookies As HttpCookie = New HttpCookie("SalesLogin") objcookies.Domain="www.mydomain.com" but it is not created... can any one help me?
Known Is Drop.Unknown Is Ocean
Also just have a look
Cheers!! Brij