How to invoke cookies on pageload?
i wrote the code as
{
Httpcookies obj1=null, obj2= null;
obj1=response.cookies("username");
obj2=response.cookies("password");
if(obj1!="null" && obj2!="null")
{
server.transfer("welcome.aspx");
}
}
but this gives me error named
non-invocable cookie., i.e cookie cannot be called as method...
error is in the line--obj1=response.cookies("username");
--obj1=response.cookies("username");
suggest me how to invoke that cookie as iam learning asp.net....
Dipa AhujaPosted Apr 12, 2010, 1:49 PM
Response.Cookies.Add(obj1);
HttpCookie cookie1 = Request.Cookies["obj1"];
{
";
else
{
String strCookieValue = cookie1.Value.ToString();