i am applying the multiple search option on a single table .. for that i have made a sp which is accepting 3 value . my problem is if i apply the multiple search on the table it is taking only one search value at a time so i used view state
if (ViewState["gen"] != null || ViewState["cen"]!=null)
{
var a = db.sp_StudentSelect1(ViewState["gen"].ToString(), ViewState["cen"].ToString());
GridView1.DataSource = a;
DataBind();
}
but it is giving me an error
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.
please help...