A
Apollo_BD
Unregistered / Unconfirmed
GUEST, unregistred user!
delphi2006做的一个asp.net程序,想做一个cookie,但是只能改变保存name,但passwrod和Email却不能保存,不知道为什么?
procedure ResponsePage.Sumbit_Click(sender: System.Object;
e: System.EventArgs);
var
mycookie:httpcookie;
begin
mycookie:=httpcookie.Create('Name',Textbox1.Text);
Mycookie:=httpcookie.Create('Password',Textbox2.Text);
Mycookie:=httpcookie.Create('Email',Textbox3.Text);
mycookie.Expires:=datetime.Now.AddMonths(1);
Response.Cookies.Add(Mycookie);
//
Response.Write('<font size=5>你的信息已经提交成功!<br></font>');
Response.Write(' Name:'+Request.Cookies['Name'].Value+'<br>');
Response.Write(' Password:'+Request.Cookies['Password'].Value+'<br>');
Response.Write(' Email:'+Request.Cookies['Email'].Value+'<br>');
//
label1.Text:=Request.Cookies['Name'].Value;
label2.Text:=Request.Cookies['Password'].Value;
label3.Text:=Request.Cookies['Email'].Value;
//
end;
procedure ResponsePage.Sumbit_Click(sender: System.Object;
e: System.EventArgs);
var
mycookie:httpcookie;
begin
mycookie:=httpcookie.Create('Name',Textbox1.Text);
Mycookie:=httpcookie.Create('Password',Textbox2.Text);
Mycookie:=httpcookie.Create('Email',Textbox3.Text);
mycookie.Expires:=datetime.Now.AddMonths(1);
Response.Cookies.Add(Mycookie);
//
Response.Write('<font size=5>你的信息已经提交成功!<br></font>');
Response.Write(' Name:'+Request.Cookies['Name'].Value+'<br>');
Response.Write(' Password:'+Request.Cookies['Password'].Value+'<br>');
Response.Write(' Email:'+Request.Cookies['Email'].Value+'<br>');
//
label1.Text:=Request.Cookies['Name'].Value;
label2.Text:=Request.Cookies['Password'].Value;
label3.Text:=Request.Cookies['Email'].Value;
//
end;