G
Guest
Hi Guys,
How different is a linkbutton control from a Button control. I have written
the followiiing code on click of a link button control, but it doesnt seem to
respond to that code, i.e nothing happens.
Please help..
Thanks,
I.A
//Check which user is logged in
OdbcConnection myCon = new CommonUtilities().CreateOdbcConnection();
myCon.Open();
string getUserType = "SELECT role from account_details ";
getUserType += "WHERE username = '" + Session["UserLogged"] + "'";
OdbcDataReader result = new
CommonUtilities().selectStatement(myCon,getUserType);
result.Read();
switch (result.GetChar(0))
{
case 'A':
Response.Redirect("AdminScreen.aspx",false);
break;
case 'T':
Response.Redirect("TeamLeaderScreen.aspx",false);
break;
case 'E':
Response.Redirect("ExaminerScreen.aspx",false);
break;
}
result.Close();
myCon.Close();
How different is a linkbutton control from a Button control. I have written
the followiiing code on click of a link button control, but it doesnt seem to
respond to that code, i.e nothing happens.
Please help..
Thanks,
I.A
//Check which user is logged in
OdbcConnection myCon = new CommonUtilities().CreateOdbcConnection();
myCon.Open();
string getUserType = "SELECT role from account_details ";
getUserType += "WHERE username = '" + Session["UserLogged"] + "'";
OdbcDataReader result = new
CommonUtilities().selectStatement(myCon,getUserType);
result.Read();
switch (result.GetChar(0))
{
case 'A':
Response.Redirect("AdminScreen.aspx",false);
break;
case 'T':
Response.Redirect("TeamLeaderScreen.aspx",false);
break;
case 'E':
Response.Redirect("ExaminerScreen.aspx",false);
break;
}
result.Close();
myCon.Close();