protected void Page_Load(object sender, EventArgs e) { String docId = Request.Form["ctl00$ContentPlaceHolder1$hid_docId"]; if (docId == null) { img_doc.ImageUrl = "assets/img/default-doctor.png"; lbl_msg.Text = "You need to find a doctor at first!"; } else { img_doc.ImageUrl = "assets/img/doc1.png"; DBC.DBClient dbc = new DBC.DBClient(); DataTable dt = dbc.findDoctorById(docId); lbl_doctor.Text = dt.Rows[0]["f_name"].ToString(); lbl_hospital.Text = dt.Rows[0]["f_name1"].ToString(); lbl_specialty.Text = dt.Rows[0]["f_spec_name"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { string docId = Request.QueryString["docId"].ToString(); img_doc.ImageUrl = "assets/img/doc1.png"; DBC.DBClient dbc = new DBC.DBClient(); DataTable dt = dbc.findDoctorById(docId); lbl_name.Text = dt.Rows[0]["f_name"].ToString(); lbl_phone.Text = "Phone: " + dt.Rows[0]["f_phoneNumber"].ToString(); lbl_spec.Text = "Specialty: " + dt.Rows[0]["f_spec_name"].ToString(); lbl_hos.Text = "Hospital: " + dt.Rows[0]["f_name1"].ToString(); if (dt.Rows[0]["f_available"].ToString().Equals("True")) { lbl_avl.Text = "Appointment: Available"; } else { lbl_avl.Text = "Appointment: Full"; } lbl_profile.Text = lbl_name.Text + " have thirty years experience on " + dt.Rows[0]["f_spec_name"].ToString(); hid_docId.Value = docId; }