Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.22/5 (2 votes)
See more: , +
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:
C#
@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.
Posted
Updated 25-Jul-14 2:34am
v2
Comments
SRS(The Coder) 25-Jul-14 9:58am    
If you are getting data from database through procedure then you can simply filter the data in stored procedure itself by passing the search text and rebind the table with filtered data. When this search text is empty get all the records to display.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900