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 355:                        float vat = 0;
Line 356:
Line 357:                        SqlDataSource5.SelectParameters.Add("parentID", Common.dataID(Request.QueryString["parentID"].ToString(), "0").ToString());
Line 358:                        if (dt.Rows[0]["productPrice"].ToString() != "") ProductPrice = float.Parse(dt.Rows[0]["productPrice"].ToString());
Line 359:                        if (dt.Rows[0]["productVat"].ToString() != "") vat = float.Parse(dt.Rows[0]["productVat"].ToString());

Source File: C:\Inetpub\vhosts\yonca.com.tr\httpdocs\list.aspx.cs    Line: 357

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   list.DataDetail() in C:\Inetpub\vhosts\yonca.com.tr\httpdocs\list.aspx.cs:357
   list.Page_Init(Object sender, EventArgs e) in C:\Inetpub\vhosts\yonca.com.tr\httpdocs\list.aspx.cs:152
   System.Web.UI.Control.OnInit(EventArgs e) +107
   System.Web.UI.Page.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +490


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