Part 62 Implementing search functionality in asp net mvc




About this tutorial:

Video duration: 17:32
Link for code samples used in the demo

Link for csharp, asp.net, ado.net, dotnet basics, mvc and sql server video tutorial playlists

In this video, we will discuss, implementing search page in an asp.net mvc application. We should be able to search by Employee Name and Gender.

We will be using table tblEmployee for this demo. Use the script below to create and populate the table with sample data.
Create table tblEmployee
(
ID int identity primary key,

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads

31 thoughts on “Part 62 Implementing search functionality in asp net mvc

    Zeshan Ahmed Khan

    (January 11, 2019 - 8:19 am)

    my radio buttont not show ?
    how can i fix it

    vijendra singh

    (January 11, 2019 - 8:19 am)

    I have the textbox from model class and i am using @Html.TextBoxFor how to mearge the code you provided within my code….????

    Marcos Ivan Robles Hernandez

    (January 11, 2019 - 8:19 am)

    GREAT!!

    Rahad Mannan

    (January 11, 2019 - 8:19 am)

    Thank You so much <3 <3 <3 Bro

    Rachel K

    (January 11, 2019 - 8:19 am)

    Thank you so much for making this video! It REALLY helped me!

    Katrina Lover

    (January 11, 2019 - 8:19 am)

    Very nice tutorial and it is really helpful

    Reid Corcoran

    (January 11, 2019 - 8:19 am)

    Hi, thanks for this video. I want to do a slight variation. I have a large table of "store locations" and I want the user to search by city. I'd like to display ONLY the text box and Search button on page load, so that the user does not see locations from other cities. When he enters the city name in the text box, I'd like the "Search" button to call my stored proc to load the table based on the Search Term, like "Denver" or "Memphis" etc. [I actually have a ZipCode table that pulls all locs by city/metro area]
    My question: should the "Search" button redirect to another view, call a partial view, etc? Do you have a video that can help me with that type of action/response?
    Thanks again!

    Aras Kuzucu

    (January 11, 2019 - 8:19 am)

    Thank you so much <3

    hannah oberlohr

    (January 11, 2019 - 8:19 am)

    Hi, will this video apply to asp.net mvc 5?

    VIKAS SINGLA

    (January 11, 2019 - 8:19 am)

    Excellent Video Sir ,I want to search without refreshing page using ajax, I tried using ajax.beginform() and also import jquery ajax files but didn't work.Please suggest.

    VIKAS SINGLA

    (January 11, 2019 - 8:19 am)

    Hello Venkat, Thanks for this video. I am facing one issue, While keeping search box empty and If I select Name Radiobutton than it is working and I am getting all rows but If I select Gender Radio button than its not working and I am getting no rows. Please suggest.

    HELPING PROGRAMMING

    (January 11, 2019 - 8:19 am)

    THANKS SIR

    H Freeman

    (January 11, 2019 - 8:19 am)

    And how to search without clicking the buttons or auto search during the page load?

    360 videos

    (January 11, 2019 - 8:19 am)

    Thank you, keep the work mate

    mr.boonchoey potvongmongkol

    (January 11, 2019 - 8:19 am)

    แทงยูสุดๆคับ

    Phillip Neiman

    (January 11, 2019 - 8:19 am)

    Love your videos Venkat! Thank you for all the help!

    Tushar Yewale

    (January 11, 2019 - 8:19 am)

    thanx

    Prashant Pimpale

    (January 11, 2019 - 8:19 am)

    Hi Venkat Sir..Can We achieve that Using AngularJS..? If Yes Then Please Make a Video..

    Ramendra Kumar

    (January 11, 2019 - 8:19 am)

    dont use html helper and strongly type

    Napoleon Mejia

    (January 11, 2019 - 8:19 am)

    Hi, I made the exercise , buy I have a problem because the parameter "search" arrive empty to "public ActionResult Index(string name)" in controller. them, I ask you how I can solven it. Thank you.

    Ahmet Yaman

    (January 11, 2019 - 8:19 am)

    Thank you Sir for your efforts.

    achu r

    (January 11, 2019 - 8:19 am)

    Thank you Sir !!!

    Rajpandian Dheenathayalan

    (January 11, 2019 - 8:19 am)

    may i know how to search with date of birth

    dancun chiriga

    (January 11, 2019 - 8:19 am)

    You are a great educator!!

    dancun chiriga

    (January 11, 2019 - 8:19 am)

    Thank you …..a thousand times and God bless

    Amjad N.

    (January 11, 2019 - 8:19 am)

    your vid have saved a week of my life
    REALLY THANK YOU !!!
    BIG LIKE

    Francois Muller

    (January 11, 2019 - 8:19 am)

    Good day, Your videos are really easy to follow, can you provide a video to make a single search box look at all the database columns and return results based on your search criteria.  example type name and it will not only look at employee name but also customer name with out the radio buttons.
    Thank you

    Khanh Lê

    (January 11, 2019 - 8:19 am)

    Very helpful and easy to understand.

    Amrit Gopali

    (January 11, 2019 - 8:19 am)

    Venkat, thank you so much for making my life easy. You are the best tutor.

    ArianitOn-

    (January 11, 2019 - 8:19 am)

    you can also search only part of names or gender by using this code db.Employee.Where(x=>x.Name.Contains(search)).ToList();

    Abhinav Kumar

    (January 11, 2019 - 8:19 am)

    very good

Leave a Reply

Your email address will not be published. Required fields are marked *