下面的代码是一个显示数据库中学校的下拉框,有没有办法让这些学校按字母顺序显示?
<td align="right" style="text-align: right; width: 170px;">
<asp:Label ID="School_lbl" runat="server" AssociatedControlID="School"
Text="School:"></asp:Label>
</td>
<td style="width: 206px">
<asp:DropDownList ID="School" runat="server" DataSourceID="School_DS"
DataTextField="SchoolName" AppendDataBoundItems="True"
DataValueField="SchoolName" Font-Names="verdana" Width="185px"
AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Selected="True">-- Select --</asp:ListItem>
</asp:DropDownList>
<asp:AccessDataSource ID="School_DS" runat="server"
DataFile="~/App_Data/MockCourt_db.mdb"
SelectCommand="SELECT [SchoolName] FROM [tbl_school]">
</asp:AccessDataSource>
</td>