I am helping out with the Orlando .NET Code Camp website and they needed to add an image button, which is something that is not supported out of the box by the current release of MVC. So after looking around I found BuildUrlFromExpression. Unfortunately it had been moved in the latest release and I tracked it down to the Futures project in CodePlex. Instead of being part of Html, it’s under LinkBuilder now, this is how you use it:
<a href="<%= LinkBuilder.BuildUrlFromExpression(null, Html.RouteCollection, x => x.Action() ) %>">
<img src="images/img.gif" alt="Some image" style="border-style: none"/>a>
Which when clicked, would call into your controller and get routed correctly.
After downloading the Futures assemblies, you need to reference the Microsoft.Web.Mvc assembly and add this to your config file, under
<add namespace="Microsoft.Web.Mvc" />
Mark Allen
Another approach which works well is to have the XML tag reference a custom TFS group. In my case there is a master contributor group shared between projects so rather than list all the contributor users in the template AssignedTo list boxes I created a TFS group called ‘TeamAssignments’ and within security I referenced the team. Then in the templates I added the tag ListItem value=[project]\TeamAssignments. Now when anyone is added to the team they are displayed in the AssignedTo List box. This also means that another team can be created without changing the templates as the changes can be done in security.
TFS Team Name: Blue (example set up in security)
TFS Group Name: TeamAssignments
Members: Team Blue