ALLInterview.com :: 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  
 
Answer
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;

Response.Cookies.Add(objCookie);

Response.Redirect("Default2.aspx");

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
 
Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net 607
How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server 633
is there any third party tools are using in .net technologies? what are there ? give me the brief introduction? 1042
9. Why should we hire you over the others waiting to be interviewed? 826
What ports must be open for DCOM over a firewall? What is the purpose of Port 135? 781
how to elimainte the similar data from the different tables 717
How can we communicate with each server in N-tier Architecture? and what are the methods? 820
Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem? 369
what is DLL Hell and how it is solved in .NET? please explain clearly?? 903
Any disadvantages in Dataset and in reflection ? 1328
What is the Difference between MVC And MVP design pattrens 1057
if i wanna deploy my asp.net 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.... 632
ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause? 465
what is silver light when will we use silver light, 440
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ? 1176
E-Mail New Answers        Answer Selected Questions