You should (in general) have a dedicated class for the things you need in the view. That will be your viewmodel for the view. The controller would fetch the necessary data from one or more tables and poplate an instance of that class. It would then pass
the viewmodel to the view.
"If I can see further than anyone else, it is only because I am standing on the shoulders of giants."blog: www.heartysoft.com twitter: @ashic
Tanxfull all for answers
But I think mean it went bad
I have two section in the one page I want with select section one (where there are actionlink) bind be section two
keivan mousa...
Member
156 Points
115 Posts
bind two table in the one page
Apr 11, 2012 12:13 PM|LINK
hi all
How bind two table in the one page???
I want use two ViewData in the one page
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: bind two table in the one page
Apr 11, 2012 12:21 PM|LINK
You should (in general) have a dedicated class for the things you need in the view. That will be your viewmodel for the view. The controller would fetch the necessary data from one or more tables and poplate an instance of that class. It would then pass the viewmodel to the view.
blog: www.heartysoft.com
twitter: @ashic
ignatandrei
All-Star
135184 Points
21682 Posts
Moderator
MVP
Re: bind two table in the one page
Apr 11, 2012 12:40 PM|LINK
please read http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/
vaibhav_shah...
Member
402 Points
113 Posts
Re: bind two table in the one page
Apr 11, 2012 01:48 PM|LINK
Hi,
Insted of using ViewData use ViewModel.
Fetch data in controller & disply it in view using viewmodel.
Click Here For More Answers
keivan mousa...
Member
156 Points
115 Posts
Re: bind two table in the one page
Apr 11, 2012 10:10 PM|LINK
Tanxfull all for answers
But I think mean it went bad
I have two section in the one page I want with select section one (where there are actionlink) bind be section two
keivan mousa...
Member
156 Points
115 Posts
Re: bind two table in the one page
Apr 12, 2012 06:22 PM|LINK
Please help me
ignatandrei
All-Star
135184 Points
21682 Posts
Moderator
MVP
Re: bind two table in the one page
Apr 13, 2012 03:45 AM|LINK
Bind? Please open a new question and detail the business case, not ( I have section one...) ... More, you could see some Ajax in action here
http://bit.ly/mvc_ajax_jquery