我需要在MVC 4創建嚮導,最讓我也做了一部分,現在是什麼在困擾我的是,我的項目需要,我已插在嚮導的第一步值應在下一步顯示如標籤。如何實現這一點,任何人都可以幫助我?如果我能得到快速響應,這將是一件好事。奇才在MVC 4
預先感謝您!
這是我如何編寫應用程序
<div class="wizard-step">
<h3>Step 3: Check Eligibility</h3>
<div class="editor-label" style="width: 25%">
@Html.LabelFor(model => model.AccountNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.AccountNumber)
</div>
<div class="editor-label" style="width: 25%">
@Html.LabelFor(model => model.MeterId)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.MeterId)
</div>
<div class="editor-label" style="width: 25%">
@Html.LabelFor(model => model.Program)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Program)
</div>
<div class="editor-label" style="width: 25%">
@Html.LabelFor(model => model.PeakLoad)
</div>
<div class="editor-field MB12">
@Html.CheckBoxFor(model => model.PeakLoad)
</div>
<div class="editor-label" style="width: 25%">
@Html.LabelFor(model => model.WifiBroadband)
</div>
<div class="editor-field MB12">
@Html.CheckBoxFor(model => model.WifiBroadband)
</div>
</div>
而控制器代碼前端代碼也有
[HttpGet]
public ActionResult EnrollUser()
{
EnrollmentEntity model = new EnrollmentEntity();
BindAggregatorList(model);
BindCBLMethod(model);
BindDeviceManuList(model);
BindDeviceModelList(model);
BindDeviceTypeList(model);
BindProgramList(model);
return View(model);
}
[HttpPost]
public ActionResult EnrollUser(EnrollmentEntity model)
{
return View(model);
}
你如何在步驟之間保存數據? – Matthew
顯示一些代碼,以便我們能夠理解您在做什麼 –
我已經使用了單個視圖和單個控制器,因此數據保存在模型中的操作之間。 –