Accessing function in the controller from view
In the view, I have 2 div, one accepts the search parameters and other one displays search results开发者_JAVA百科. I have a controller wherein there is function for displaying first div (search parameters) at startup and also function for displaying search results. I am new to the MVC architecture. My question is, how do I access the search function in the controller after clicking on the search button in first div? Any ideas?
You have to provide attributes for the controller, [HTTPGET] for search parameters routine and [HTTPPOST] for taking the user input as method parameters and then processing it.
精彩评论