下拉列表绑定在aspx页面中 [英] Dropdown list bind in aspx page

查看:60
本文介绍了下拉列表绑定在aspx页面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dropdown list bind in  aspx page





我尝试过:



< asp:DropDownList ID =drpappariserrunat =serverCssClass = dropdownclr text_input

TabIndex =29Style =text-transform:uppercase; text-align:centerDataSourceID =empse

DataTextField =NameDataValueField =employee_id>



What I have tried:

<asp:DropDownList ID="drpappariser" runat="server" CssClass="dropdownclr text_input"
TabIndex="29" Style="text-transform: uppercase; text-align: center" DataSourceID="empse"
DataTextField="Name" DataValueField="employee_id">

推荐答案

您可以将其绑定在代码后面。看看这个:将下拉列表绑定到DataBase ASP.NET论坛 [ ^ ]
You to bind it on code behind. Check this out: bind dropdownlist to DataBase | The ASP.NET Forums[^]


配置数据库empse,表中有两列Name和employee_id,您希望从中获取下拉列表的记录。
Configure your datasourse "empse" with table has two columns Name and employee_id from which you want to get records for dropdown.


这篇关于下拉列表绑定在aspx页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆