现象:
页面上只有一个Dropdownlist和label,点击Dropdownlist后在label上显示Dropdownlist的value值。结果在页面回退时,Dropdownlist显示总和label不一致。
aspx代码:
<body MS_POSITIONING="GridLayout">
   <form id="Form1" method="post" runat="server">
     <asp:DropDownList id="ddlTest" runat="server"AutoPostBack="True">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
     </asp:DropDownList>
     <asp:Label id="lblTest" runat="server"></asp:Label>
    </form>
</body>
cs代码:
private void ddlTest_SelectedIndexChanged(object sender,System.EventArgs e)
{
   lblTest.Text = DropDownList1.SelectedValue.ToString();
}