我有下面的代码块,如何显示“选择一个”作为顶部选定的值?填充下拉列表控件并显示“选择一个”作为默认
<table>
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="StudentName" DataValueField="StudentName"></asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ddl_connStudentProfile %>" SelectCommand="SELECT [StudentName] FROM [StudentProfile]"></asp:SqlDataSource>
</td>
</tr>
</table>
您是否有名为“select one”的学生,或者您是否需要将其添加为列表顶部的项目? – 2014-10-07 13:04:13