如何使用mvc搜索表中的所有字段 [英] how to search all fields in table using mvc
本文介绍了如何使用mvc搜索表中的所有字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
这里我正在搜索一个字段来检索相关记录但是现在我想搜索我表格中的所有字段..
描述:
在我的模块中,我只搜索联系人姓名以检索相关记录,但现在我想搜索所有字段,如姓名,联系人姓名,国家/地区,州,城市所有领域
这里我使用此代码搜索一个字段:
@ Html .TextBox( Branch_Name,ViewBag.branch_NameFilter as string , new {@class = form-control control-text})
@ Html.ValidationMessageFor(model = > model [ 0 ]。Branch_Name)
i使用此代码搜索单个字段。
解决方案
可以通过以下链接帮助您... ASP.NET MVC中的jQuery DataTables高级过滤(jQuery DataTables和ASP.NET MVC集成 - 第五部分) [ ^ ]
hi to all,
Here i'm searching one fields to retrieve relevant records But now i want to search all fields in my tables..
DESCRIPTION:
In my module i'm searching only contactperson name to retrieve relevant record but now i want to search all fields like name,Contactname,country,state,city all fields
Here i using this code for searching one fields:
@Html.TextBox("Branch_Name", ViewBag.branch_NameFilter as string, new { @class = "form-control control-text" })
@Html.ValidationMessageFor(model => model[0].Branch_Name)
i use this code for searching single field.
解决方案
May be the following link helps you... jQuery DataTables Advanced Filtering in ASP.NET MVC (jQuery DataTables and ASP.NET MVC Integration - Part V)[^]
这篇关于如何使用mvc搜索表中的所有字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文