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 1733:                        DataView dv1 = _dtManufactuer.Tables[1].DefaultView;
Line 1734:                        dv1.RowFilter = "branch_type='Branch' " + whereQueryLocation;
Line 1735:                        DataTable _dtOfficeTable = dv1.ToTable(true, "manu_id");
Line 1736:                        var mIds = "";
Line 1737:                        foreach (DataRow dr in _dtOfficeTable.Rows)

Source File: c:\inetpub\wwwroot\pcbdirectory.com\App_Code\FrontEnd.cs    Line: 1735

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.DataView.ToTable(String tableName, Boolean distinct, String[] columnNames) +608
   System.Data.DataView.ToTable(Boolean distinct, String[] columnNames) +23
   PCB.FrontEnd.GetAllManufacturerCache(String oCountry, String oState, String oCity, String specValue, String oOrderBy, String oSortOrder, Int32 topLimit, Int32 pages, Int32& TotalCount, String type, String manufacture_supply, String t_sort_order, String f_sort_order, String t_type, DataSet ds, Int32 isFiltercountry, DataTable& dtManuSpec) in c:\inetpub\wwwroot\pcbdirectory.com\App_Code\FrontEnd.cs:1735
   directory_directory.GetAllManufacturesCache() in c:\inetpub\wwwroot\pcbdirectory.com\directory\directory.aspx.cs:1557
   directory_directory.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\pcbdirectory.com\directory\directory.aspx.cs:354
   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.4330.0