473,396 Members | 1,714 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,396 software developers and data experts.

HELP? Cookie object use (code behind). so much easy with ASP/COM+

Suggested that I move my question to this post, HELP

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

Nov 18 '05 #1
3 1196
Try "Imports System.Web" instead of "Imports System.Web.HttpCookie".

--
John Saunders
johnwsaundersiii at hotmail
"chris" <an*******@discussions.microsoft.com> wrote in message
news:7F**********************************@microsof t.com...
Suggested that I move my question to this post, HELP?

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 defined

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

Imports System.Data.Sqlclient
Imports System.Data
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Web.HttpCookie

It's use:

'Now set cookie
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.MaxValue
Response.Cookies.Add(objCookie)

Nov 18 '05 #2
that was the trick! question is I do 'system.web 'does that mean everything in web (system.web) is open for use? if so, why not just inherit/import system????????????
Nov 18 '05 #3
No, System.Web is just System.Web.

--
John Saunders
johnwsaundersiii at hotmail
"chris" <an*******@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
that was the trick! question is I do 'system.web 'does that mean

everything in web (system.web) is open for use? if so, why not just
inherit/import system????????????
Nov 18 '05 #4

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

Similar topics

18
by: | last post by:
Please help. After a number of wrong turns and experiments I need advice on login management system to secure our web pages without inconveniencing our visitors or our internal staff. What I...
14
by: Alec S. | last post by:
Hi, I'm using JavaScript and Cookies for some customization in a web page. There may be several values in the cookie with names that are not known at runtime. I need a way of deleting them. ...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
3
by: Chris | last post by:
In VS 6.0 it was easy to create a new dll, compile it, and all the vb runtime files were nicely added to it via the references that you gave. Then in an ASP page youjust referenced, after...
10
by: pcthug | last post by:
Hi All, I am creating multi-tier app in vb.net using visual studio .net. I create a invoice.vb class file with properties, events and methods. This also has a line item collection class...
7
by: itay_k | last post by:
Hi, I dont understand why this is so complicated, just to add one line of cookie header on the GET request. This is my unworking code: import time import Cookie import cookielib, urllib2
1
by: Joe | last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which closely coincide with my expired session) by checking for the Authentication Cookie when the login screen loads. If the...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.