I am trying to populate a drop down list on partial post back, not sure why it's not working.
this works,
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
populatemyDropDownList();
}
this doesn't work,
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
populatemyDropDownList();
}
Scenario
*I click on button_1 in UpdatePanel_1, which then triggers a partial post back (no page refresh) and tries to populate DropDownList which is in UpdatePanel_2*
when I debug, I can see code behind method is triggering and going through this code but no gain, I think partial post back resets DropDownList ????
using (SqlDataSource sqlds = new SqlDataSource(ConnectionString(), SelectCommand()))
{
drop1.DataSource = sqlds;
drop1.DataTextField = "UserName";
drop1.DataBind();
}