Currently im trying to migrate a project from .net 1.1 to 2.0.While running the application its giving an exception for the below code while doing the update operation:
protected void btnUpdate_Click (object sender, System.EventArg s e)
{
int ParamID=Convert .ToInt16(Sessio n["ParamID"].ToString());(s howing exception at this line)
....
....
}
private void grdParameters_I temCommand(obje ct source, System.Web.UI.W ebControls.Data GridCommandEven tArgs e)
{
Session["ParamID"]=e.Item.Cells[0].Text.ToString( );
.....
.....
....
}
The exception that is raised is:
"Null pointer Exception unhandled by the usercode".Objec t reference not set to an instance of an object.
protected void btnUpdate_Click (object sender, System.EventArg s e)
{
int ParamID=Convert .ToInt16(Sessio n["ParamID"].ToString());(s howing exception at this line)
....
....
}
private void grdParameters_I temCommand(obje ct source, System.Web.UI.W ebControls.Data GridCommandEven tArgs e)
{
Session["ParamID"]=e.Item.Cells[0].Text.ToString( );
.....
.....
....
}
The exception that is raised is:
"Null pointer Exception unhandled by the usercode".Objec t reference not set to an instance of an object.
Comment