Translate

Thursday, 24 August 2017

calling dropdownlist SelectedIndexChanged inside user define function in asp.net c#

 void LoadPersonalDetail(string Emp_Id)
    {
        DataTable dtData = new DataTable();
        dtData = new BLL().FillDataTable("select * from Mst_Emp where Emp_Code='"+Emp_Id+"'");
        BindCountry();
        ddlCountry.SelectedValue = dtData .Rows[0]["Country_Id"].ToString();
        object sender=new object();
        EventArgs e=new EventArgs();
        ddlCountry_SelectedIndexChanged(sender,e);// for bind state
        ddlState.SelectedValue = dtData .Rows[0]["State_Id"].ToString();

    }

No comments:

Post a Comment