ASP.NET MVC search box: use modal popup or inline div or redirect to another page?
- by JK
I have a view with a textbox and a search button, eg CustomerTextBox and CustomerSearchButton.
The list of customers is too long to display in a dropdown, and there has to be advanced search functions anyway.
What is the best practice in MVC to handle this case? When the user clicks on the search button, should it:
A. Load another view into a modal popup (eg /customers/search)? How would you do this in MVC, just set popupWindow.location.href = '/customers/search'? How would you return the value to the main view?
B. Have the search form in a hidden div that expands when the search button is clicked? How would be done? a partial view maybe?
C. Redirect the user to a search page by means of RedirectTo("/customers/search")? How would you return the value to the main class?
I've only been doing MVC for 3 days so thanks to those who answer my questions that might have quite obvious answers that I cant see yet. :)