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 7: protected void Page_Load(object sender, EventArgs e) Line 8: { Line 9: string strCat = Request.QueryString["Category"].ToString() Line 10: string strBook = Request.QueryString["Book"].ToString() Line 11: string strConn = ConfigurationManager.ConnectionStrings["BookStoreDBConnectionString1"].ToString() Source File: c:\Users\Asmaa\Documents\Visual Studio 2010\Projects\BOOKSTORE\BOOKSTORE\BooksDetails.aspx Line: 9
Request.QueryString["Category"]
if(Request.QueryString["Category"] != null) { strCat = Request.QueryString["Category"].ToString() }
Convert.ToString(Request.QueryString["Category"]);
string strCat = Request.QueryString["Category"]; string strBook = Request.QueryString["Book"]; string strConn = ConfigurationManager.ConnectionStrings["BookStoreDBConnectionString1"]!=null? ConfigurationManager.ConnectionStrings["BookStoreDBConnectionString1"].ToString(): string.Empty;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)