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
 
how can create login from create and written conde in asp.net 811
We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave? 434
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate? 387
how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool 640
What is the Difference between MVC And MVP design pattrens 1061
I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place? 417
How Response.flush works in server.Execute ? 1385
What is HTTPModule and HTTPcontext? What is the use of each? 919
how to elimainte the similar data from the different tables 720
What is the syntax for datagrid and specifying columns? 1170
I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please? 498
I have an excel file with data, i am importing this excel file data into Sqlserver 2005 database. while importing i am getting wrong data(ie, special characters) in one column(description column), upto some limit the data in that column is coming fine,after that data is coming like below. The "Walter" leather storage bench is one of our most popular styles. The top with the tufting and double stitching finish a very impressive piece. The size is perfect in front of beds and the storage adds another functional bonus. Open it up and sneak al&#65533;&#65533;&#65533;&#435;&#65533;Â&#65533;&#65533;&#436;&#65533;Ã&#65533;&#65533;&#438;&#65533;Å&#65533;&#65533; al&#65533;&#65533;&#65533;&#435;&#65533;Â&#65533;&#65533;&#436;&#65533;Ã&#65533;&#65533;&#438;&#65533;Å&#65533;&#65533; Is there anywhy to resolve this? (I am using recordset in coding for developing import process.) please help me soon. 452
6. Tell us about a time when you failed to meet a deadline. What were the repercussions? 739
Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution? 301
what are the security certificates used in webservices? 514
E-Mail New Answers        Answer Selected Questions