开发者

method call in mvc2

I am a fresher and new to mvc2.I have a method in my model class dat开发者_开发知识库 will display a pie chart in a view. Now i have to call this method inside the index method of the controller. Can anyone guide me how to do this?


I think that the method in the model should give information to view in order to create the chart.

So:

Controller:
  get data for pie chart
  pass it to the view (return view(model))

Model 
  function to get the data for the pie chart

View
  display a pie chart with the data supplied by the controller.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜