salgiza
salgiza

Reputation: 5900

Html.RenderAction is not available after including Microsoft.Web.Mvc dll

We want to use Html.RenderAction in our MVC1.0 project. I have downloaded the Futures Microsoft.Web.Mvc dll from codeplex, copied it to the bin folder in our project, and added a reference to it.

However, when I try to use it in one of our views, Html.RenderAction is still not available.

It might be just a silly detail I'm missing, but I have no idea what else I have to do :(

P.S. I checked, and I can actually write "Microsoft.Web.Mvc.ViewExtensions.RenderAction" and Visual Studio autocompletes the code just fine, so it seems the dll is correctly included in the project.

Upvotes: 1

Views: 1853

Answers (3)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

You might need to modify your web.config:

<compilation debug="true">
  <assemblies>
    <add assembly="Microsoft.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
  </assemblies>
</compilation>

<pages>
  <namespaces>
    <add namespace="Microsoft.Web.Mvc"/>
  </namespaces>
</pages>

Upvotes: 0

Daniel Elliott
Daniel Elliott

Reputation: 22857

RenderAction is part of the MvcFutures project.

Kindness,

Dan

Upvotes: 0

Magnus Bertilsson
Magnus Bertilsson

Reputation: 615

You have to add it to the "namespaces" tag in web.config.

 <system.web>
      <pages>
         <namespaces>
           <add namespace="Microsoft.Web.Mvc"/>
         </namespaces>
      </pages>
   </system.web>

Upvotes: 4

Related Questions