Hi guys
Below is the piec of code to check if user exist in the system
if ((txtLoginID.Text == dRow["EmpEmail"].ToString()) && txtPassword.Text == dRow["EmpPassword"].ToString() && ddlvalue==cli)
{
if ("Doctor" == dRow["EmpType"].ToString() || "Nurse" == dRow["EmpType"].ToString())
{
Server.Transfer("~/Employee/frmEmployeeHome.aspx?EmpIDNumber=" + dRow["EmpIDNumber"].ToString());
found = true;
}
else
if ("Admin" == dRow["EmpType"].ToString())
{
Server.Transfer("~/Administration/frmTelerikScheduling.aspx");
found = true;
}
}
When I come to this line"
Server.Transfer("~/Administration/frmTelerikScheduling.aspx");
"
It goes to that page...Now below is the code from "
frmTelerikScheduling.aspx
"
protected void Page_Load(object sender, EventArgs e)
{
populateddlEmployeesOnPageLoad();
loadDDLServices();
loadDDlPatients();
getAppointments();
}
So i noticed after my application read the methods it goes back to the login form
and read the code below
public void loadDDlClinicName()
{
if (!Page.IsPostBack)
{
systemBusinessLayer = new BusinessLayer();
ArrayList clinicList = new ArrayList();
clinicList = systemBusinessLayer.getClinics();
ddlClinicName.DataSource = clinicList;
ddlClinicName.DataTextField = "ClinicName";
ddlClinicName.DataValueField = "ClinicRefNumber";
ddlClinicName.DataBind();
ddlClinicName.Items.Insert(0, ".:Select Clinic:.");
}
}
Then it complains about an empty object in this line "clinicList = systemBusinessLayer.getClinics();"
method loadDDlClinicName() runs on pageload of the login page
this weird...I need help