:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
Categories >> Software >> Microsoft Related >> ASP.NET


Question How do you create a permanent cookie?
 Question Asked In Companies ::     < I also faced this Question! >
 Question Submitted By :: guest
  Answer Posted By  
write this cod on submit button : ..........

HttpCookie objCookie = new HttpCookie("UserCookie");
objCookie.Values.Add("UserName", TextBox1.Text);
objCookie.Values.Add("UserPass", TextBox2.Text);

//for permanent cookie .......
objCookie.Expires = DateTime.MaxValue;



Is This Answer Correct ?    5 Yes 1 No

  surya beniwal
View All Answers
Please Help Members By Posting Answers For Below Questions
 Question Views   Select
Advantage of Update Panel over 2.0 + C#+ Microsoft Ajax 1.0 1893
What is Difference between Production Serves and Development Servers? And Suppose, m adding/deleting C# file in a project based on the Specific Requirement. These Files are Automatically updated in Production Servers? So Which tool is needed to do This One? 459
Hi All, Im an MCA holder with 3+ years of experience in Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj 1661
1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5 677
What is HTTPModule and HTTPcontext? What is the use of each? 816
How to send a DataReader as a parameter to a remote client ? 1558
a)COM Callable Wrapper b)Runtime Callable Which one of the above is Win32 API in .Net? 549
benefits of migration from asp to hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to .plz give me some points which i should incorporate in my ppt thanks 616
if i wanna deploy my project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too.... 545
In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely 471
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net 505
How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here. 339
Write some code using interfaces, virtual methods, and an abstract class` 457
How would ASP and ASP.NET applications run at the same time on the same server? 878
If Instancing = Single use for ActiveX Exe, how will this be executed if there are 2 consecutive client requests ? 899
E-Mail New Answers        Answer Selected Questions