html.actionlink with .net 4.0 renders empty links

Posted by tmfkmoney on Stack Overflow See other posts from Stack Overflow or by tmfkmoney
Published on 2010-04-29T21:48:30Z Indexed on 2010/04/29 23:17 UTC
Read the original article Hit count: 488

Filed under:
|
|
|

This should hopefully be a simple configuration problem.

When my application targets .Net 3.5

This code

<%= Html.ActionLink("Forgot your password?","ForgotPassword") %>

renders this:

<a href="/Account/ForgotPassword">Forgot your password?</a> 

When my application targets .Net 4.0

The same code renders:

<a href="">Forgot your password?</a> 

It's dropping the url part.

backwards compatibility is supposedly enabled in my web.config.

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">

Ideas?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#4.0