Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2006, 04:30 PM
Authorized User
 
Join Date: Sep 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

I've tried that, but that's not it. It's probably going to bug you as much as it bugs me!!

Still getting that compilation error.

Sharon
 
Old October 24th, 2006, 04:50 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Okkkkkk,
    Now this is starting to bug me. First off, don't do a Response.Write in lbl.text = 'code that is where the current error is coming from. Now on to the second (or first) error. I have this code setup on a page in Visual Studio:

        Dim aCookie As New HttpCookie("lastVisit")
        aCookie.Value = DateTime.Now.ToString
        aCookie.Expires = DateTime.Now.AddDays(1)
        Response.Cookies.Add(aCookie)

        lbl.Text = Server.HtmlEncode(Request.Cookies("lastVisit").Val ue)
This will write out the current date and time to my label control if, however, I change Request.Cookies("lastVisit") to say, "aCookie" I get the Null Reference Error. So, what this tells me is that the cookie you are trying to access does not exist =
I don't know?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
System.NullReferenceException JayLou BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 April 6th, 2007 12:55 PM
System.NullReferenceException lwheless BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 24th, 2006 05:47 AM
System.NullReferenceException: Object reference no nidy_online VS.NET 2002/2003 2 June 9th, 2004 09:17 PM
System.NullReferenceException: Object reference... nordestgaard All Other Wrox Books 4 January 7th, 2004 01:06 AM
[NullReferenceException: Object reference not set creiche ASP.NET 1.0 and 1.1 Basics 3 September 23rd, 2003 08:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.