Ask a Question related to ASP.NET Security, Design and Development.
-
Ray #1
cookie expiry date problem
Below is the code to save the cookie and set the expiry date of the cooki
Response.Cookies["demo"].Value ="Hello"
DateTime dt = DateTime.Now
TimeSpan ts = new TimeSpan(0,0,10,0)
Response.Cookies ["demo"].Expires = dt.Add(ts);
Below is the code to retrieve the stored cookie
if (!Page.IsPostBack)
HttpCookie dcookie = Request.Cookies["demo"]
if (dcookie != null)
urlevel.Text = dcookie.Values["level"]
urname.Text = dcookie.Values["user"];
daysx.Text = Convert.ToString(Request.Cookies["demo"].Expires)
els
Response.Redirect ("haha.htm")
When I display the Response.Cookies ["demo"].Expires = dt.Add(ts); it returns the current date + 10 minute
But the days.Text returns 01/01/0001. Why? Please help Thanks
Ray
Ray Guest
-
Validate expiry date in Yaromat Check Form
I use Yaromat's Check Form extension on all of the forms I've created. On our secure payment forms, there are 2 select boxes - one for month and one... -
WHOIS expiry date ...
I've got a number of domains, and want to check the expiry date automatically. There's plenty of whois scripts, but the output from the different... -
expiry date in the exe
I saw something about this on the forum a while back, but I can't find it now... I want to put an expiry date into the exe's of my programme, so... -
Ever tried to set cookie expiry date using JavaScript?
Hi all. I'm trying to set a cookie expiry date but my script is JS (JavaScript). I've tried Response.Cookies("Test").Expires = Date();... -
AUTOMATING EXPIRY DATE FROM THE DATE ENTERED
Build a form with three TextBoxes: , , . In the LostFocus event for use the following code: Private Sub txtArrive_LostFocus() Dim dtArr as...



Reply With Quote

