This articles talks about one simple technique that is when we make request for any resource/data in in server to ASP.NET MVC Web Application, the request is first processed by a method that is action method. Any public & non static method in a controller class is an action method. Every action method inside the…
ASP.NET
Nowadays everyone carrying either smart phone or tablet. It’s very important for web developers to build application which works seamlessly on both desktop & mobile browsers. ASP.NET MVC 4 Developer Preview has good support for building mobile web apps. The New ASP.NET MVC 4 Project dialog includes one more additional template i.e: Mobile Application along…
Scott Gu announced ASP.NET MVC 4 Developer Preview in last month BUILD Conference, lets have look at MVC 4 Developer preview. Download ASP.NET MVC 4 Developer Preview Here We can install ASP.NET MVC 4 Developer Preview on top Visual Studio 2010 or Visual Studio 2011 Developer Preview. We can read ASP.NET MVC 4 Developer Preview…
Controller in ASP.NET MVC 2 (MVC 3 also) supports property named ViewData. ViewData help us to pass data from controllers to views , in between views using using a late-bound dictionary API. ViewData is property of type ViewDataDictionary in ControllerBase class. ViewData properties are stored as name/value pairs in the ViewData dictionary.
We have couple of enhancements in terms of JavaScript and Ajax in ASP.NET MVC3. By default, Ajax & Validation helpers in ASP.NET MVC 3 use an unobtrusive JavaScript approach Validation helpers uses jQuery validation plugin for client side validations By default, Client Side validation is enabled What is Unobtrusive JavaScript?Unobtrusive JavaScript avoids injecting inline JavaScript…
Whenever we submit HTML or JavaScript as input in ASP.NET MVC application we get an exception like “A potentially dangerous Request.Form value was detected from the client (……)”. Because ASP.NET MVC has built-in request validation that helps you automatically protect against cross-site scripting (XSS) attacks and HTML injection attacks, it will prevent the user from…
ASP.NET MVC 3 supports a new view engine called Razor. As we know ASP.NET MVC 3 has cool improvements using razor, which makes code clean & concise. One of the simple & cool improvement is @model keyword. Scenario is i want to create strongly typed view to display the list of person details. In .aspx…
In the interest of aiming high and reaching big, goal is to make ASP.NET MVC the best web platform for building modern rich web apps. So we’re focusing on features in ASP.NET MVC 4 (and across the web stack) that will get us closer to reaching this goal.
Generally any time we are designing a web application / website, we want to maintain same look & feel across website. e.g.: common header, footer, menu bar etc. For example If we want to design a static website in html with common look & feel (common header, footer, menu bar etc), we involve in duplicating…
This article is about how to send json object to asp.net controller action method & bind it to strongly typed .NET object. We have many mechanism to do this. Bind json encode string to System.Object, write logic to decode the json encoded string & bind it to Model or ViewModel. Write custom model binder with…