开发者

Accessing function in the controller from view

开发者 https://www.devze.com 2023-03-23 20:51 出处:网络
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 parame

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消