UserViewControl.cshtml
adlı Users
görünüm klasörümdeki bir dosyam var.RenderParça görünümü aynı görüntüleme klasöründe
gerçek görüntüsü (Users.cshtml
) My kodudur:
@Html.RenderPartial("RegisterViewControl")
Hata: Gelecekte hareket olabilir tam tam görünüm klasör olarak böyle yolunu yazın istemiyorum The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
:
@Html.RenderPartial("~/Views/Users/RegisterViewControl.cshtml")
Kod RegisterViewControl.cshtml yılında:
@model SampleMVC.Web.ViewModels.RegisterModel
@using (Html.BeginForm("Register", "Auth", FormMethod.Post, new { Id = "ERForm" }))
{
@Html.TextBoxFor(model => model.Name)
@Html.TextBoxFor(model => model.Email)
@Html.PasswordFor(model => model.Password)
}
Bu, ajax tarafından sunulacak bir formdur, ancak tüm onaylamayı viewmodel'den istiyorum.
gönderin UserViewControl.cshtml – Clicktricity
@Clicktricity içindeki kod eklendi. –