十分急!!DropDownList的问题
下面这些代码:
<asp:DropDownList id= "ModeList " AutoPostBack= "True "
OnSelectedIndexChanged= "Selection_Change "
runat= "server ">
<asp:ListItem Value= "su "> Month </asp:ListItem>
<asp:ListItem Value= "ke " Selected= "True "> MonthYear </asp:ListItem>
</asp:DropDownList>
DropDownList默认显示行为:MonthYear。我选择了Moth,这行,DropDownList就显示了Moth这行,我刷新了页面,DropDownList又跳回了MonthYear,我想要页面刷新后,不跳回显示MonthYear而是显示Moth这行,用代码怎么实现,谢谢各位大虾吗?
------解决方案--------------------可以将选择项保存在ViewState里,页面加载时根据这个设置哪个selected