|
-
Sep 30th, 2003, 10:34 AM
#1
Thread Starter
Fanatic Member
Cookies question
Using the following I can create a cookie :
Dim mycookie As New HttpCookie("Userinfo")
mycookie("Name") = "Whatever"
mycookie("City") = "Whatever ..."
e.t.c.
How would I declare this if the value "mycookie" is in fact stored in a variable.
e.g
dim myvar as string
myvar = "mycookie"
dim myvar as new HttpCookie("Userinfo") will kick up a stink.
Any ideas geniuses
Cheers
-
Sep 30th, 2003, 10:36 AM
#2
You are trying to cast from a string to an HttpCookie object. myvar should be declared as a cookie.
-
Sep 30th, 2003, 10:46 AM
#3
Thread Starter
Fanatic Member
You have lost me a bit Eednis.
When the user opens a particular detail page I query the database and return the detail record.
One of the fields in my database is called pageName.
I need to create a cookie named after the contents of this field.
e.g "page1" or "detailpage" which is held in pageName.
Thanks so far.
This .net stuff really is starting to sink in now.
I can rightfully say that apart from Crystal reports and Package and Deployment, I love .net.
-
Sep 30th, 2003, 11:03 AM
#4
A Cookie is a collection type object so it can't be stored in a string (its stored in the cookie). So if you want to create a cookie NAMED after a field then use the string as the name instead of assigning the string to the cookie. But I'm not really sure I understand what you are trying to do, maybe somehting like this:
VB Code:
dim myvar as string="mycookie"
dim myCookie as new HttpCookie(myvar)
-
Sep 30th, 2003, 11:15 AM
#5
Lively Member
Crystal reports is bad ass, once you get it figured out. Check out the post I recently made about it. I outlined how to do it so it works every time. It outlines parameter passing, authentication, etc. CR works great after you understand it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|