in my web site, i need to collect user name from a cookie name ("zyblerdotcom")("usr") in every page.<BR><BR>if there is a user name in that cookie i assume that user is logged in. If not, not yet log in.<BR><BR>that's in ASP (VBScript). But in ASP.NET, things are a bit different.<BR><BR>If the cookie ("zyblerdotcom")("usr") has a value in it (Not Null), <BR><BR>user = Request.Cookies("zyblerdotcom")("usr")<BR><BR>can access the value, but if the cookie is NULL, and I access it that way, it gives me the error:<BR><BR>System.NullReferenceException: Value null was found where an instance of an object was required<BR><BR>what happend here? hwo to fix it?<BR>Thanks a million.Maybe try something like...<BR><BR> If Not Request.Cookies("zyblerdotcom")("usr") Is Nothing Then<BR> user = Request.Cookies("zyblerdotcom")("usr")<BR> Else<BR> ' No cookie... set one<BR> Response.Cookies("zyblerdotcom")("usr").Value = http://aspmessageboard.com/archive/index.php/"fumanchu" <BR> End Ifthanks.