2
Answers

how to use @html.renderpartial() and return of controller ac

rizwana ahmed

rizwana ahmed

8y
229
1
plz show codes..not running...
@{Html.RenderAction("Archieves", "UserBlog");}

public ActionResult Archieves()
{
try
{
var model = new BlogModel();
var blogRecentList = _apiBlog.GetAllBlogArchieves().ToList();

model.BlogList = blogRecentList.Select(item =>
{
return new BlogModel()
{
Month = item.MonthYear,
};
}).ToList();

model.ArchievesBlogList = model.BlogList.OrderByDescending(x => x.ID).ToList();

return PartialView("_BlogArchieve", model);

}
catch (Exception ex)
{
throw ex;
}
} 
Answers (2)
0
Bikesh Srivastava

Bikesh Srivastava

NA 19.8k 835k 8y
can you share your complete code..
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 8y
Follow below link that may help you:
http://stackoverflow.com/questions/14157072/using-renderactionactionname-values-in-mvc4-issue
http://devproconnections.com/development/how-use-aspnet-mvc-render-action-helpers