简体   繁体   中英

Alternative to Html.EditorFor in MVC 1

I am following the mvcMusicStore tutorial and it is very good but the problem is that it asks me to include a html helper known as " Html.EditorFor ". This html helper is not in MVC 1 which is what I am using. What else can I use to go around this? This helper is suppose to allow me to link the Edit View to an edit template know as Album which I have created. This is the coding which is included in the tutorial:

<%: 
Html.EditorFor(model => model.Album, 
new { Artists = Model.Artists, Genres = Model.Genres}) 
%>

Please look at the MvcMusicStore Tutorial from page 40 onwards to help you understand the situation. This can be download from Microsoft's MVC website.

Templated helpers were introduced in ASP.NET MVC 2. Html.RenderPartial is probably the closest you could get in ASP.NET MVC 1.0. It is strongly recommended to migrate to at least ASP.NET MVC 2.0, assuming ASp.NET MVC 3.0 is the current stable production release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM