Server Error in '/' Application.

Column 'category_name' does not belong to table .

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.ArgumentException: Column 'category_name' does not belong to table .

Source Error:


Line 34:             if (product.ProductTable.Rows.Count > 0)
Line 35:             {
Line 36:                 CategoryName = product.ProductTable.Rows[0]["category_name"].ToString();
Line 37:                 SubcategoryName = product.ProductTable.Rows[0]["subcategory_name"].ToString();
Line 38:                 SubcategoryID = Convert.ToInt32(product.ProductTable.Rows[0]["subcategory_id"].ToString());

Source File: c:\inetpub\vhosts\seeautomation.com\httpdocs\product-description.aspx.cs    Line: 36

Stack Trace:


[ArgumentException: Column 'category_name' does not belong to table .]
   System.Data.DataRow.GetDataColumn(String columnName) +6034804
   System.Data.DataRow.get_Item(String columnName) +14
   product_description.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\seeautomation.com\httpdocs\product-description.aspx.cs:36
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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