473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HttpCookie use in a code behind

I'm struggling with using the HttpCookie object on a code behind. Used in the page works great
I'm getting a: Type 'HttpCookie' is not define

I've tried adding the namespace to the vb form but no luck

Imports System.Data.Sqlclien
Imports System.Dat
Imports Syste
Imports System.Web.U
Imports System.Web.UI.WebControl
Imports System.Web.UI.HtmlControl
Imports System.Web.HttpCooki

It's use

'Now set cooki
Dim objCookie As New HttpCookie("nasbawebsitenew"
objCookie.Values("userid") = memberdata3("USER_EMAIL"
objCookie.Values("userpassword") = memberdata3("USER_PASSWORD"
objCookie.Values("datecreated") = Date.Now(
objCookie.Expires = DateTime.MaxValu
Response.Cookies.Add(objCookie)
Jul 21 '05 #1
1 1585
Hi Chis,

This is a normal question for the newsgroup

microsoft.public.framework.aspnet

See the articles about cookies in that newsgroup
http://tinyurl.com/23wew

I hope this helps?

Cor
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ivan Demkovitch | last post by:
Hi! System.Net.Cookie class offers greater flexibility for working with Cookies compare to System.Web.HttpCookie. Is there any way to work with cookies thru System.Net.Cookie instead of...
0
by: Chris | last post by:
Just a curiosity: Is it standard practice to UrlEncode and UrlDecode cookie values? I wouldn't have even stumbled across this except I noticed that when I retrieve a cookie that was set with...
1
by: Waqqas Farooq | last post by:
Can I add more than 1 values in a cookie? e.g if i create a httpcookie then the syntax would be like this: Dim myCookie as new HttpCookie("myCookieName") myCookie.Value = "myval1"...
0
by: Nuro de Matos Carvalho | last post by:
Hi all, I'm having a strange problem using cookies, setting values with special characters. Set cookie data: <snipet> string encryptedTicket = FormsAuthentication.Encrypt(authTicket);...
1
by: chris | last post by:
I'm struggling with using the HttpCookie object on a code behind. Used in the page works great I'm getting a: Type 'HttpCookie' is not define I've tried adding the namespace to the vb form but no...
3
by: ulabala | last post by:
I was trying to retrieve the cookie collection and display the domain to which those cookies were written to, but I always see a NULL value for the domain property. Can anyone shed some light?...
2
by: Terry Olsen | last post by:
I don't understand the error i'm getting on this page. Is this a bug or am I doing something wrong? Exception Details: System.InvalidCastException: Unable to cast object of type...
3
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
What properties on a HttpCookie give invalid information when you read it from the Request object? For example if you run this code, I believe the domain, expires, and HttpOnly do not tell the...
3
by: =?Utf-8?B?UGF1bA==?= | last post by:
Does anyone know if it is possible to change the datatype of a string into an HTTPCookie? I tried CType and it would not let me do it.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.