Tag Archives: mvc

ODATA WCF Data Services Friendly URLS using Routing

Posted on

When you creating your first OData WCF Data service common tasks is to give a friendly URL instead of using filename.svc as entry point.You can archive it with URL routing feature in ASP.NET MVC.Just modify your Global.asax.cs route registration block to include following lines. public static void RegisterRoutes(RouteCollection routes) { routes.Clear(); var factory = new   …Continue Reading

cannot convert from ‘void’ to ‘System.Web.WebPages.HelperResult

Posted on

Today i was trying to convert ASP.NET MVC 2 master pages to ASP.NET MVC3 Razor master layout.chtml and hit following error trying to call @Html.RenderAction(“Footer”, “Root”); which has been converted from <% Html.RenderAction(“Footer”, “Root”); %>. To solve problem simply use @{Html.RenderAction(“Footer”, “Root”); }. It calls RenderAction and ignores return type. @Html.RenderAction(“Footer”, “Root”); is trying to   …Continue Reading