tags:

views:

558

answers:

3

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.

A: 

RenderAction is part of the MvcFutures project.

Kindness,

Dan

Daniel Elliott
+4  A: 

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>
Magnus Bertilsson
That was it! So easy, yet every page I found about Futures omitted this step(!)Thanks! :)
salgiza
A: 

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>
Darin Dimitrov