Hi everyone,
in an .aspx page I have multiple update panels in each there's whether dropdownlist or a repeater.
Of course once there's an updatepanel a problem with browser back button.
I managed to re-set all the (
cascading) dropdownlists when click back button, but binding the repeater with data I'm not able to do.
So My questions are:
1- the proper way to user Script manager AddHistoryPoint (using all history points in the last dropdownlist otherswise is not gonna work).
2-Add history point to a repeater and manage the scriptmanager Navigate.
Thanks in advance
Samira
What I have tried:
**Adding History point to the drop downlists //from trim dropdownlist:
protected void DropDownListTrim_SelectedIndexChanged(object sender, EventArgs e)
{
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("yearid", DropDownListAnnee.SelectedItem.Value);
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("year", DropDownListAnnee.SelectedItem.Text);
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("modelid", DropDownListModele.SelectedItem.Value);
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("model", DropDownListModele.SelectedItem.Text);
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("trimid", DropDownListTrim.SelectedItem.Value);
ScriptManager.GetCurrent(this.Page).AddHistoryPoint("trim", DropDownListTrim.SelectedItem.Text);
}
**set selected values of the dropdownlists (
not sure if this is the correct way to do this)
protected void ScriptManager1_Navigate(object sender, HistoryEventArgs e)
{
DropDownListAnnee.SelectedValue = e.State["yearid"];
DropDownListAnnee.SelectedItem.Text = e.State["year"];
DropDownListModele.SelectedItem.Value = e.State["modelid"];
DropDownListModele.SelectedItem.Text = e.State["model"];
DropDownListTrim.SelectedItem.Value = e.State["trimid"];
DropDownListTrim.SelectedItem.Text = e.State["trim"];
}