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
 
Write some code using interfaces, virtual methods, and an abstract class` 473
9. Why should we hire you over the others waiting to be interviewed? 808
what is publisher? 593
What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox? 318
How Response.flush works in server.Execute ? 1287
Securitywise What are the Enhancements in 2.0? 457
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this. 766
How about the security in Activex DLL and Activex EXE ? 663
what is command line compiler.what are the steps and how it is related to debugging. 418
3. What goals do you have in your career? 447
What is work flow gen? how can it will work with .Net? 1233
can s/w quality assurance engineer switch field to programming side i m very much interested in programming but not much good in it 440
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. 435
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks 695
6. Tell us about a time when you failed to meet a deadline. What were the repercussions? 710
E-Mail New Answers        Answer Selected Questions