if (e.CommandName == "View")
{
ImageButton lb = (ImageButton)e.CommandSource;
GridViewRow gvr = (GridViewRow)lb.NamingContainer;
string id = (string)gvdetails.DataKeys[gvr.RowIndex].Value;
Session["applciationid"] = id;
DataSet ds = obj1.GetCompanyUserDetails(id);
string usertype = ds.Tables[0].Rows[0]["Applicanttype"].ToString();
if (usertype == "Individual")
{
Session["applciationid"] = id;
Response.Redirect("default.aspx");
}
if (usertype == "Company")
{
Session["applciationid"] = id;
Response.Redirect("default.aspx");
}
}
{
ImageButton lb = (ImageButton)e.CommandSource;
GridViewRow gvr = (GridViewRow)lb.NamingContainer;
string id = (string)gvdetails.DataKeys[gvr.RowIndex].Value;
Session["applciationid"] = id;
DataSet ds = obj1.GetCompanyUserDetails(id);
string usertype = ds.Tables[0].Rows[0]["Applicanttype"].ToString();
if (usertype == "Individual")
{
Session["applciationid"] = id;
Response.Redirect("default.aspx");
}
if (usertype == "Company")
{
Session["applciationid"] = id;
Response.Redirect("default.aspx");
}
}
No comments:
Post a Comment