如何使用asp.net从下拉列表中搜索记录 [英] How to search records from dropdown list using asp.net

查看:75
本文介绍了如何使用asp.net从下拉列表中搜索记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我想使用asp.net从下拉列表中搜索记录我创建了包含name,ownerdepartment,status,createdon和createdby的字段。下拉列表是部门和创建者。现在在下拉列表中,如果我选择信息技术,它应该显示与信息技术相关的数据。请帮助我做。以下是html。



Hi I want to search records from dropdown list using asp.net I have created fields with name, ownerdepartment, status, createdon and createdby. dropdown lists are department and createdby. Now in dropdown list if I select information technology it should display data related to information technology. Please kindly help me to do. Below is the html.

<tr>
       <td style="width:120px;text-align:top" class="blue">OwnerDepartment:</td>
        <td class="auto-style9"><asp:DropDownList ID="ddlOwnerDepartment" runat="server"

            onselectedindexchanged="DropDownList_SelectedIndexChanged" >
                                                 </asp:DropDownList>
                         </td>
    </tr>







及以下是aspx.vb中的视图代码




and below is the view code in aspx.vb

Private Sub DropDownList_SelectedIndexChanged(sender As Object, e As EventArgs)
    ddlOwnerDepartment.SelectedValue = DropdownList.SelectedItem.Value
End Sub







先谢谢!!




Thanks in advance!!

推荐答案

下面列出的链接可以帮到你





下拉列表 [ ^ ]



绑定和搜索 [ ^ ]
Below listed links may help you


Dropdown list [^]

Binding and searching[^]


这篇关于如何使用asp.net从下拉列表中搜索记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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