Use the search function in your ASP. net mvc, asp. netmvc
In a program, the search function is rarely used. I will demonstrate this in the ASP. NET environment today.
In the cshtml view, there are three text boxes for the user to enter keywords, and then click the rightmost "Search" button. If there is any result, it will be displayed below.
Html:
2 rows for the table. One line is the title and one line is used as the input box.
JQuery code:
Controller:
After processing the conditions, import them to the database:
You can use or and as needed. Conditions, You can implement "=", "<>", "LIKE", "BETWEEN xxx AND xxx.
Maybe you want to see how the stored procedure is written in the database:
Here, you will see Operator in the program and enumeration Logic in Search. You also want to know how it generates SQL condition statements?
You don't have to worry about it. Download the above DLL directly .. . NET Framework 4.6 environment:
Http://download.cnblogs.com/insus/Library/Insus.NET.Search.rar