asp.net-如何使用多重条件和下拉列表进行排序 [英] asp.net- How to sort with mutliple criteria and dropdown list

查看:61
本文介绍了asp.net-如何使用多重条件和下拉列表进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找进行多个条件搜索的最佳方法.用户将在下拉列表中进行选择,并在文本框中填写要搜索的度量.任何人都有建议.

I''m trying to find the best way to do a search with multiple criteria. The user would make a selection on a drop-down list and fill in text box with a measurement to search for. Anyone have a suggestion.

推荐答案

页面上具有多个/不同的搜索条件控件-它可以包含几个文本框,复选框,下拉列表和日历.

用户填写搜索参数后,在搜索"按钮上单击事件-将所有搜索参数作为参数化查询/存储过程传递给您的数据库.根据这些参数运行查询,并获取UI层中的数据.

将检索到的数据绑定到Grid(或任何其他控件)并显示它.
完毕.这应该可以很好地满足您的需求.
Have multilple/different search criteria controls on a page - it can have few textboxes, checkboxes, dropdown and calendars.

Once user fills the search parameters, on Search button click event - pass on all the search parameter as a parameterized query/Stored Procedure to your DB. Run the query based on those parameters and get back the data in UI layer.

Bind the retrieved data to Grid(or any other control) and display it.
Done. This should suffice your need in a good way.


这篇关于asp.net-如何使用多重条件和下拉列表进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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