From the image i try to load two controllers, on pageload Browse controller loads with 1 and 2 data from picture, when i want to select the date,it should load the dayselect controller data in same page. How can i do this , My controllers are here
public ViewResult Browse(Int32 eventid) {
//code
return view(ef);
}
public ActionResult DaySelect(EventModel m) {
return view("_Common",k);
}
My viewModel for Browse Controller is Browse.cshtml
@model BrowseEventModel
<div class="Event_Name" id="id_name">@Model.EventName</div>
<div class="Event_loc" id="id_loc">@Model.EventLocation</div>
//In this view i have a widget which i load in partial view
<div class="yui3-g" id="bottom_container"> @{Html.RenderPartial("_Common");}
</div>
The partial view is _common.cshtml
@model BrowseEventModel
<select name="dayNo" id="dayNo">
@foreach (var s in Model.Dayselector) {
<option value = "@s.DayNo"> @s.DayDate.ToString("dd MMM yyyy")</option>
}
</select>
//View Model used for both browse and dayselect controller
@foreach(var e in Model.DisplayData){
<ul id="ul-data">@e.dataName</ul>
<div id="ul-id">@e.dataid</div>
}
When i select the date it should load data in same view page is it possible,i.e injecting view on runtime