我有一个dropdownlist(autopostback启用)在我的项目绑定通过sqldatasource,我已经使用列表项添加了一个初始值。问题是即使选择了我不想要的初始值,页面也会被回发。有没有办法做到这一点?停止autopost返回默认值dropdownlist asp.net
<asp:DropDownList ID="DropDownListTheme" runat="server"
DataSourceID="SqlDataSourceTheme" DataTextField="h_theme"
DataValueField="h_theme" Height="30px" Width="30%"
AppendDataBoundItems="true" AutoPostBack="True">
<asp:ListItem Text="--Select One--" Value="-1" />
</asp:DropDownList>
你的意思是你想在回发后选择初始值吗? –
谢谢队友,我已经得到了我的答案。 –