Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 250:                    }
Line 251:                    if (Request.Cookies["HStyle"] != null)
Line 252:                        HFHair.Value = Request.Cookies["HStyle"].Value.ToString();
Line 253:                    else
Line 254:                    {

Source File: d:\TryNowData\TryNow\Try.aspx.cs    Line: 252

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Try.Page_PreInit(Object sender, EventArgs e) in d:\TryNowData\TryNow\Try.aspx.cs:252
   System.Web.UI.Page.OnPreInit(EventArgs e) +11854755
   System.Web.UI.Page.PerformPreInit() +45
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1109


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3130.0