开发者

MVC-3 and Html.Serialize (ASP.NET 4, MVC3)

Currently working on a proj开发者_如何转开发ect in MVC-3. Trying to put the following code in my view, but Visual Studio is telling me it can't find the Serialize method.

@Html.Serialize("User",Model)

(ex)

@using (Html.BeginForm())
{

 @Html.Serialize("User",Model)
    <fieldset>
...
    </fieldset>
}

Is this feature missing in MVC-3? I see examples of people using it in MVC-2. Perhaps there is a new way of handling this issue?


Html.Serialize is in the Futures assembly.


Install the Nuget package: Install-Package Mvc3Futures.

On your view, add a reference to namespace Microsoft.Web.Mvc, then you can use Html.Serialize.


Serialize() is not listed here.

It is not a part of Sys.Web.Mvc, but is for now part of Microsoft.Web.Mvc:


I downloaded the futures, removed reference to its local System.Web.Mvc (v3), and added the release version from GAC, and included the new futures DLL in project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜