Html.RenderAction() and Html.Action() methods are available in ChildActionExtensions (System.Web.Mvc.Html) class in ASP.NET MVC. Generally both methods are used for calling action methods or child action methods and rendering the result of action method in view. @Html.Action() – Invokes the specified child action method and returns the result as an HTML string. @{ Html.RenderAction(); } –…
ASP.NET
First version of razor is shipped with ASP.NET MVC 3. ASP.NET MVC 4 come with Razor V2.0. Razor V2.0 includes some tiny & happy features. URL Resolution Enhancements: We use the relative URL for any resources (images, scripts, css) in code , for example : <script src=”~/Scripts/jquery-1.8.2.js”></script> But in runtime we should resolve the full…
The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to…
ASP.NET Web API is a framework for building HTTP services that can reach a broad range of clients including browsers, phones and tablets. ASP.NET Web API ships with ASP.NET MVC 4 and is part of the Microsoft web platform. You can read more about Web API in my earlier article @ http://65.1.162.244/blog/say-hello-to-asp-net-web-api/ As I mentioned…
ASP.NET MVC 4 can be installed side by side with ASP.NET MVC 3 on the same computer, We can run both version of ASP.NET MVC projects on same machine. If we would like upgrade an ASP.NET MVC 3 Project to ASP.NET MVC 4 Project, they are multiple ways. The simplest way to upgrade is to…
ASP.NET MVC 4 now includes ASP.NET Web API, Which is formerly known as WCF Web API. In this article I am not digging into any details of Web API. I am going to explain through a sample how to create a Web API as part of ASP.NET MVC 4 solution. Web API is not just…
In my application I am calling an action method from JavaScript & expecting result as JSON. This is pretty simple in ASP.NET MVC, Once we get response object in action method we can call Json() method pass response object as a parameter, then it will transform your response object as JSON & return it as…
Update:I have an update blog post explains bundling and minification features, differences between MVC 4 beta & RTM in following link: http://65.1.162.244/blog/bundling-and-minification-in-asp-net-mvc-4/ Most of the web developers today uses multiple JavaScript and CSS files for separation the concerns, for readability & maintainability of code. This is a very good practice from a development point of…
ASP.NET MVC 4 provides a new feature called Browser Overriding.Browser Overriding API helps us lets your application treat requests as if they were coming from a different browser (user agent) than the one they’re actually from. Browser Overriding API provides few extension methods for HttpContext class, the method are part of BrowserHelpers class in System.Web.WebPages…
View Switcher is a component available as part of jQuery.Mobile.MVC NuGet package for ASP.NET MVC 4. It contains prototype helpers for jQuery Mobile in ASP.NET MVC 4. Generally when we are browsing mobile site in mobile/tablet sometimes we may want to switch to desktop view, but usually as per the browser detection technique, application always…