Ekrem Tapan

Ekrem Tapan

  • NA
  • 967
  • 80.8k

How can i return 2 model on 1 view

Oct 25 2016 10:41 PM
Hello Everyone  
 
How do I return two different Views from the same Action in ASP.NET MVC
 
for ex :
  1. public ActionResult Index()  
  2.         {  
  3.             var CalenderModel = _calendar.getCalender(DateTime.Now.Month, DateTime.Now.Year);  
  4.               
  5.              return View(new NewsModel {  
  6.                 ActivityNewsList = DB.ActivityNews.ToList()  
  7.             });  
  8. }  
 
Also want to return CalendarModel on above Action. how can i do it ?
 

Answers (3)