or
@(Html.Kendo().Window()
.Name("window")
.LoadContentFrom("FirstAction", "Controller", new { area = ""})
.Modal(true)
.Visible(false)
)
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function openModalForm(e) {
e.preventDefault();
var windowElement = $('#window').data("kendoWindow");
windowElement.refresh();
windowElement.center();
windowElement.open();
}
</
script
>
<
span
>@Html.ActionLink("Link to open window", "Action", Controller", new { area = "" }, new { onclick = "javascript:openModalForm(event);" })</
span
>
public
ActionResult FirstAction()
{
return
PartialView(
"_MainWindowContent"
,
new
MyModel());
}
@model MyWeb.Models.MyModel
<
div
class
=
"popup"
id
=
"popupDiv"
>
@{
Html.RenderPartial("_FirstStep", Model);
}
</
div
>
@model MyWeb.Models.MyModel
<
div
class
=
"form"
>
<
h1
class
=
"step-1"
>Form field title</
h1
>
<
div
class
=
"form-list"
>
@using (Ajax.BeginForm("FirstStep", "Controller", null, new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "popupDiv", InsertionMode = InsertionMode.Replace }, new { id = "mainForm" }))
{
<
ul
>
<
li
class
=
"form-field"
id
=
"firstField"
>
@Html.LabelFor(m => m.FirstField, "First field")
<
div
class
=
"input-box"
>
@Html.TextBoxFor(m => m.FirstField)
</
div
>
</
li
>
<
li
class
=
"form-field"
id
=
"secondField"
>
@Html.LabelFor(m => m.SecondField)
<
div
class
=
"input-box"
>
@Html.TextBoxFor(m => m.SecondField)
</
div
>
</
li
>
<
li
class
=
"form-field"
id
=
"thirdField"
>
@Html.LabelFor(m => m.ThirdField)
<
div
class
=
"input-box"
>
@Html.TextBoxFor(m => m.ThirdField)
</
div
>
</
li
>
<
li
class
=
"form-field"
id
=
"fourthDate"
>
@Html.LabelFor(m => m.FourthDate)
<
div
class
=
"password-box"
>
@Html.Kendo().DatePickerFor(m => m.FourthDate)
</
div
>
</
li
>
</
ul
>
@Html.HiddenFor(m => m.HiddenValue)
}
</
div
>
<
div
class
=
"popup-navigation"
>
<
button
id
=
"nextButton"
> Go to next step </
button
>
</
div
>
</
div
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
$("#nextButton").click(function () {
$("#HiddenValue").val("true");
$("#mainForm").submit();
});
</
script
>
</
div
>