Hello:
The code below works fine on one server, but send error msg on another server. Please advice. Thanks.
Error Msg: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
protected void Page_Load(object sender, EventArgs e)
{
//My Tickets if Basic User
if (!IsPostBack)
{
edipi = commonHD.getEDIPI();
ViewState["strSortBy"] = "TicketID";
ViewState["strSortDirection"] = "DESC";
bindTickets();
//Initial Sort - By TicketId in Descending Order
DataView dtsort = (DataView)Session["dvGrid"];
string str = ViewState["strSortBy"] + " " + ViewState["strSortDirection"];
if (str != "")
{
dtsort.Sort = str; ******Error here *****
gvTickets.DataSource = dtsort;
gvTickets.DataBind();
}
}
}
The code below works fine on one server, but send error msg on another server. Please advice. Thanks.
Error Msg: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
protected void Page_Load(object sender, EventArgs e)
{
//My Tickets if Basic User
if (!IsPostBack)
{
edipi = commonHD.getEDIPI();
ViewState["strSortBy"] = "TicketID";
ViewState["strSortDirection"] = "DESC";
bindTickets();
//Initial Sort - By TicketId in Descending Order
DataView dtsort = (DataView)Session["dvGrid"];
string str = ViewState["strSortBy"] + " " + ViewState["strSortDirection"];
if (str != "")
{
dtsort.Sort = str; ******Error here *****
gvTickets.DataSource = dtsort;
gvTickets.DataBind();
}
}
}