asp.net 2.0中新增的AppendDataBoundItems
比如
<asp:DropDownList ID="DropDownList1" AppendDataBoundItems="true" runat="server" DataSourceID="SqlDataSource1" DataTextField="state" DataValueField="state">
??? <asp:ListItem Text="(Select a State)" Value="" />???
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
?????????????????? ConnectionString="<%$ ConnectionStrings:pubsConnectionString %>"
?????????????????? SelectCommand="SELECT DISTINCT [state] FROM [authors]">
</asp:SqlDataSource>
? 則為dropdownlist的第一項增加了一個要求用戶選擇的提示的信息,而在與sqldatasource或其他數據源綁定后,其不會消失
轉載于:https://www.cnblogs.com/jackyrong/archive/2006/02/06/326281.html
總結
以上是生活随笔為你收集整理的asp.net 2.0中新增的AppendDataBoundItems的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: vs05b2中给dataset添加表间关
- 下一篇: [导入]医药代表