No problem, here's the highlight reel:
HomeController.cs
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Working()
{
return View("_Panel");
}
public Ext.Net.MVC.PartialViewResult Panel(string containerId)
{
return new Ext.Net.MVC.PartialViewResult
{
RenderMode = RenderMode.AddTo,
ViewName = "_Panel",
ContainerId = containerId,
WrapByScriptTag = false
};
}
}
Index.cshtml
@(Html.X().FormPanel()
.Layout(LayoutType.Form)
.Items(
Html.X().Button()
.Listeners(l => l.Click.Handler = "Ext.net.DirectMethod.request({ url: '" + Url.Action("Panel") + "', params: {containerId: 'panelTarget'}});")
.Text("Load View"),
Html.X().Panel()
.ID("panelTarget")
.Height(200)
)
)
_Layout.cshtml
<!DOCTYPE html>
<html>
<head>
<title>@ViewBag.Title</title>
<script src="@Url.Content("~/Scripts/BoxSelect.js")" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/BoxSelect.css")" />
</head>
<body>
@(Html.X().ResourceManager()
)
@RenderBody()
</body>
</html>
_Panel.cshtml
@(Html.X().FormPanel()
.Layout(LayoutType.Form)
.Items(
Html.X().FieldSet()
.Items(i => i.Add(
new GenericComponent<ComboBox> {
GenericInstanceOf = "Ext.ux.form.field.BoxSelect",
GenericXType = "boxselect",
Component = { FieldLabel = "test", Width = 200 } }))
)
)
RouteConfig.cs
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{exclude}/{extnet}/ext.axd");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}",
defaults: new { controller = "Home", action = "Index" }
);
}
}
Standard web.config & viewstart.cshtml