Answered by:
Creation of view with dynamic Model in asp.net mvc

Question
-
I am new Asp.Net Mvc . I am doing a sample application for Blogging . I tried to create Partial view forArchives for categorizing Post according to date .
Month/Year(count) Post 1 Post 2 Month/Year(count) Post 1 Post 2
In controller[ChildActionOnly] public ActionResult Archives() { var post = from p in db.Posts group p by new { Month =p.Date.Month, Year = p.Date.Year } into d select new { Month = d.Key.Month , Year = d.Key.Year , count = d.Key.Count(), PostList = d}; return PartialView(post); }
Please help me write View for this Action with this Month, Year , Count and collection of Post .
- Moved by Caillen Thursday, January 23, 2014 2:19 AM
Wednesday, January 22, 2014 10:35 AM
Answers
-
Arun,
Save you the time, this forum does no ASP.Net
Be aware that if you forget to write that it is ASP.Net this forum in the link bellow is also suitable for your qeuestion
http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework
Success
CorWednesday, January 22, 2014 10:56 AM -
Hello,
Specifically, this should be asked in the ASP.Net MVC forum on forums.asp.net.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Friday, May 2, 2014 7:54 PM
All replies
-
Arun,
Save you the time, this forum does no ASP.Net
Be aware that if you forget to write that it is ASP.Net this forum in the link bellow is also suitable for your qeuestion
http://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework
Success
CorWednesday, January 22, 2014 10:56 AM -
Hello,
Specifically, this should be asked in the ASP.Net MVC forum on forums.asp.net.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Friday, May 2, 2014 7:54 PM