Apr 29, 2011, 3:46 PM
Ext.Net MVC - how to populate page controls
Hi,
I have some controls (selectbox, treegrid, etc) on my view page and I'm wondering how I pass data to them from the controller so that they are populated when the page loads.
For example, I would think of doing this for the selectbox:
View:
I have some controls (selectbox, treegrid, etc) on my view page and I'm wondering how I pass data to them from the controller so that they are populated when the page loads.
For example, I would think of doing this for the selectbox:
View:
<%: Html.DropDownList("Months", (SelectList)ViewData["Months"])%>
Controller: public ActionResult Index()
{
var months = GetMonths();
ViewData["Months"] = new SelectList(months, "Id", "Name");
return View();
}
However, I'm not sure how to achieve the same with Ext.
Last edited by fordprefect; Apr 29, 2011 at 10:41 PM.