Server Error in '/' Application.

Column 'brand_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 'brand_name' does not belong to table .

Source Error:


Line 72:             foreach (DataRow dRow in dt.Rows)
Line 73:             {
Line 74:                 Response.Redirect("~/" + dRow["root_name"].ToString().Replace(" ", "-").Replace("&", "and") + "/" + dRow["type_name"].ToString().Replace(" ", "-").Replace("&", "and") + "/" + dRow["subtype_name"].ToString().Replace(" ", "-").Replace("&", "and") + "/" + dRow["brand_name"].ToString().Replace(" ", "-").Replace("&", "and") + "/Productdetail/" + ClassType[0].ToString() + "/" + ClassType[1].ToString());  
Line 75:             }
Line 76:         }

Source File: d:\Site\benzolcycle\wwwroot\SearchView.aspx.cs    Line: 74

Stack Trace:


[ArgumentException: Column 'brand_name' does not belong to table .]
   System.Data.DataRow.GetDataColumn(String columnName) +5975747
   System.Data.DataRow.get_Item(String columnName) +13
   SearchView.CheckCategory() in d:\Site\benzolcycle\wwwroot\SearchView.aspx.cs:74
   SearchView.Page_Load(Object sender, EventArgs e) in d:\Site\benzolcycle\wwwroot\SearchView.aspx.cs:23
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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