craigthames
Dec 03, 2020, 4:04 PM
Hi, my team is migrating from EXT.Net 4.7 (.Net Framework) into EXT.NET 7.2 Classic for Core. We have been using the MVC/Razor syntax for views for years and hoped we would find the same syntax available here. Is that something that still exists? Knowing that 7.2 is still very new, I haven't found any similar questions.
Thanks so much!
Example of what I'm looking for
@{
ViewBag.Title = "Default Button - Ext.NET MVC Examples";
Layout = "~/Views/Shared/_BaseLayout.cshtml";
var X = Html.X();
}
@section example
{
@(X.Container()
.Layout(LayoutType.VBox)
.Height(650)
.Items(
X.FormPanel()
.Title("Last Button by default")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');")
),
X.FormPanel()
.Title("Button by Index")
.DefaultButton("1")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
),
X.FormPanel()
.Title("Button by ID")
.DefaultButton("Button2")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.ID("Button2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
),
X.FormPanel()
.Title("Button by Selector")
.DefaultButton("button[text=Button 2]")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
)
)
)
}
Thanks so much!
Example of what I'm looking for
@{
ViewBag.Title = "Default Button - Ext.NET MVC Examples";
Layout = "~/Views/Shared/_BaseLayout.cshtml";
var X = Html.X();
}
@section example
{
@(X.Container()
.Layout(LayoutType.VBox)
.Height(650)
.Items(
X.FormPanel()
.Title("Last Button by default")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');")
),
X.FormPanel()
.Title("Button by Index")
.DefaultButton("1")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
),
X.FormPanel()
.Title("Button by ID")
.DefaultButton("Button2")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.ID("Button2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
),
X.FormPanel()
.Title("Button by Selector")
.DefaultButton("button[text=Button 2]")
.BodyPadding(5)
.Width(350)
.Items(
X.TextField()
.FieldLabel("Item 1"),
X.TextField()
.FieldLabel("Item 2")
)
.Buttons(
X.Button().
Text("Button 1"),
X.Button()
.Text("Button 2")
.OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
X.Button().
Text("Button 3"),
X.Button().
Text("Button 4")
)
)
)
}