public void loadPersonalLastName() { DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname"); DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname"); PresenterData objpres = new PresenterData(); DataTable dt = objpres.GetPersonalName(ddlfirstname.SelectedItem.Text, "", "L", "Y"); CommonFun objcf = new CommonFun(); objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID"); if (dt.Rows.Count == 1) { ddllastname.SelectedIndex = 1; hdnfirstnameid.Value = ddllastname.SelectedItem.Value; } loadphonedetails(); ddllastname.Focus(); }
//protected void ddltitle_SelectedIndexChanged(object sender, EventArgs e) //{ // DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname"); // DropDownList ddltitle = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddltitle"); // Label lblfax = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblfax"); // Label lblemail = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblemail"); // Label lblphone = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblphone"); // TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname"); // DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname"); // AjaxControlToolkit.AutoCompleteExtender acefirstname = (AjaxControlToolkit.AutoCompleteExtender)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("acefirstname"); // acefirstname.ContextKey = ddltitle.SelectedValue; // txtfirstname.Text = string.Empty; // ListItem li = ddllastname.Items[0]; // ddllastname.Items.Clear(); // ddllastname.Items.Add(li); // lblfax.Text = string.Empty; // lblemail.Text = string.Empty; // lblphone.Text = string.Empty; // loadPersonalFirstName(); //} protected void txtfirstname_TextChanged(object sender, EventArgs e) { DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname"); TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname"); ddllastname.Focus(); PresenterData objpres = new PresenterData(); DataTable dt = objpres.GetPersonalName(txtfirstname.Text, "", "L", "Y"); CommonFun objcf = new CommonFun(); objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID"); if (dt.Rows.Count == 1) { ddllastname.SelectedIndex = 1; hdnfirstnameid.Value = ddllastname.SelectedItem.Value; loadphonedetails(); setneweditlink(); } setneweditlink(); }
public void loadPersonalFirstName() { //DropDownList ddltitle = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddltitle"); DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname"); PresenterData objpres = new PresenterData(); dt = objpres.GetPersonalName(null, "", "F", "Y"); objcf.FillDropDownList(ddlfirstname, dt, "PERSONAL_FNAME", "PERSONAL_ID"); }