阅读背景:

mvc在控制器和视图之间传递数据

来源:互联网 

I am developing an application. I have created a view and a controller. The view has a button, on the click of which I am supposed to do database operations. I have put the database operations in the model, I am creating the object of model in the controller. On clicking the button the action is handled by a method in the controller, and the object of the model is created to get the records from the database. I would like to know if there is any way to display this data in the view.Is the approach correct or the view is supposed to interact with model directly to get the data. Following is the code in controller that gets invoked on the button clickI am developing an application. I have created




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: