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 164:    protected void Page_PreInit(object sender, EventArgs e)
Line 165:    {
Line 166:        switch (Request.QueryString["IdSite"].ToString())
Line 167:        {
Line 168:            case "3":

Source File: c:\Websites\parts.sbi-international.com\btu-calculator.aspx.cs    Line: 166

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   btu_calculator.Page_PreInit(Object sender, EventArgs e) in c:\Websites\parts.sbi-international.com\btu-calculator.aspx.cs:166
   System.Web.UI.Page.OnPreInit(EventArgs e) +11692239
   System.Web.UI.Page.PerformPreInit() +46
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +334


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