|
 |
aspx thread: Re: aspx digest: February 21, 2001
Message #1 by "Amir Aslam" <amir@i...> on Wed, 21 Feb 2001 19:29:03 -0800
|
|
What is the command to get focus on a textbox item using ASPX, i.e.
TextBoxName.Focus = True
Thanks, Amir
Message #2 by "Amir Aslam" <amir@i...> on Wed, 21 Feb 2001 19:30:35 -0800
|
|
How do I check it a cookie selection exists? I get an error in this code if
there is no local cookie.
Code:
Dim strCookie As HttpCookie
strCookie = Request.Cookies("2GoNetwork")
If strCookie.HasKeys Then
strUid.Text = strCookie.Value
End If
Message #3 by "Michael Gaertner" <mgaert@b...> on Thu, 22 Feb 2001 14:49:01 -0500
|
|
I believe you need to check if the cookie variable is null before you use
it.
If strCookie = Null Then...
Good luck.
Michael
-----Original Message-----
From: Amir Aslam [mailto:amir@i...]
Sent: Wednesday, February 21, 2001 10:31 PM
To: ASP+
Subject: [aspx] Re: aspx digest: February 21, 2001
How do I check it a cookie selection exists? I get an error in this code if
there is no local cookie.
Code:
Dim strCookie As HttpCookie
strCookie = Request.Cookies("2GoNetwork")
If strCookie.HasKeys Then
strUid.Text = strCookie.Value
End If
Message #4 by "dave" <support@1...> on Thu, 22 Feb 2001 12:38:18 -0800
|
|
Here is an article relating to testing for null cookies...
http://www.aspfree.com/authors/chris_hilbert/nullcookies.aspx
If CheckCookie = Nothing Then
Response.Write("No Cookies Exist")
Else
Response.Write("<p>Username: " & Request.Cookies("misc")("username"))
Response.Write("<p>Password: " & Request.Cookies("misc")("password"))
End If
if you want more info, here is my link list of articles relating to cookies...
http://www.123aspx.com/directory.asp?dir=79
http://www.123aspx.com/directory.asp?dir=71
Cheers!
dave
The Largest ASP.NET Directory
http://www.123aspx.com
|
|
 |