override protected void Page_Load(object sender, System.EventArgs e) { base.Page_Load(sender, e); valMsg.Text = ""; groupMessage.Text = ""; AddBtn.ImageUrl = "../Images/AdminImages/submit.gif"; AddBtn.Width = 65; AddBtn.Height = 21; SelectPatientName.Attributes.Add("onchange", "this.form." + SelectSubmitted.ClientID + ".value = 'true'; this.form.submit();"); if (Page.IsPostBack) { //check if form is submitted from select box or to update password if (!Request.Form["SelectPatientName"].Equals("") && Request.Form["SelectSubmitted"] != null && Request.Form["SelectSubmitted"].Equals("true")) { this.ShowInstitutionSelect(int.Parse(Request.Form["SelectPatientName"])); } } else { // Put user code to initialize the page here //don't use AdminUtil function because need username here if (Request.QueryString["firstLetter"] != null && Request.QueryString["firstLetter"].ToString().Length > 0) { PatientDa das = new PatientDa(); string searchTerm = Request.QueryString["firstLetter"].ToString() + "%"; DataTable dt = das.GetPatientsByLastName(searchTerm); DataView view = dt.DefaultView; view.Sort = "PatientName ASC"; SelectPatientName.DataSource = view; SelectPatientName.DataValueField = "PatientId"; SelectPatientName.DataTextField = "PatientName"; SelectPatientName.DataBind(); SelectPatientName.Items.Insert(0, new ListItem("")); SelectedLetter.Value = Request.QueryString["firstLetter"].ToString(); } else { SelectedLetter.Value = ""; } SelectInstitutionTable.Visible = false; } }//end page_load