Asp.Net MVC Razor Tutorial - For Beginners & Professionals
Different ways of rendering layouts in Asp.Net MVC
Posted By : Shailendra Chauhan, 14 Jun 2013
Updated On : 14 Jun 2013
In Asp.Net MVC, Layouts are like as Master Pages in Asp.Net Web Forms. These helps us to maintain consistent look and feel across all the views within your Asp.Net MVC application. Like Master Pages, Layout may contains common CSS, jQuery files across the multiple Views and one or more placeholders for which Views provide content.
Exception or Error Handling and Logging in MVC4
Posted By : Shailendra Chauhan, 14 Mar 2013
Error handing is the main concern in any application, whether it is web application or desktop application. Usually, we catch the exception and log its details to database or text,xml file and also display a user friendly message to end user inplace of error.
Html submission by ValidateInput and AllowHtml attribute in MVC4
Posted By : Shailendra Chauhan, 13 Mar 2013
Updated On : 14 Mar 2013
Sometimes, your required to save Html data in the database. By default Asp.Net MVC doesn't allow a user to submit html for avoiding Cross Site Scripting attack to your application. Suppose you have below form and you can submit the Html in description textarea.
return View() vs return RedirectToAction() vs return Redirect() vs return RedirectToRoute()
Posted By : Shailendra Chauhan, 11 Mar 2013
Updated On : 16 May 2013
There are different ways for returning/rendering a view in MVC Razor. Many developers got confused when to use return View(), return RedirectToAction(), return Redirect() and return RedirectToRoute(). In this article, I would like to explain the difference among "return View()" and "return RedirectToAction()", "return Redirect()" and "return RedirectToRoute()".
Donut Caching and Donut Hole Caching with Asp.Net MVC 4
Posted By : Shailendra Chauhan, 21 Jan 2013
Updated On : 22 Jan 2013
Donut caching is the best way to cache an entire web page except for one or more parts of the web page. Before Donut caching, we have Output Caching which cache the entire web page.
Custom Razor View Engine for C# and VB
Posted By : Shailendra Chauhan, 20 Jan 2013
Updated On : 20 Jan 2013
You should be happy to know, Asp.Net MVC is an open source and highly extensible framework. You can customized it according to your need. As you read my previous article Removing the Web Form View Engine for better performance of Razor View Engine from your Asp.Net MVC Razor application. In this article, you will learn how can you customize the Razor View engine for C# and VB language.
Enhancing WebGrid with Insert Update and Delete Operations
Posted By : Shailendra Chauhan, 15 Jan 2013
Updated On : 15 Jan 2013
Many developers want to do Insert, Update and Delete with in WebGrid like as GridView, but don't know how to do it. This article will help you to do the CRUD operations with in WebGrid.
RenderPartial vs RenderAction vs Partial vs Action in MVC Razor
Posted By : Shailendra Chauhan, 13 Jan 2013
Updated On : 14 Jan 2013
There are different ways for rendering a partial view in MVC Razor. Many developers got confused whether to use RenderPartial or RenderAction or Partial or Action helper methods for rendering a partial view. In this article, I would like to expose the difference among Html.RenderPartial, Html.RenderAction, Html.Partial & Html.Action.
How to upload a file in MVC4
Posted By : Shailendra Chauhan, 12 Jan 2013
Updated On : 13 Jan 2013
Uploading a file in Asp.Net MVC application is very easy. The posted file is automatically available as a HttpPostedFileBase parameters in the action of the controler. For uploading a file on the server you required to have a file input control with in html form having encoding type set to multipart/form-data.
Enhancing WebGrid with ajax in MVC4
Posted By : Shailendra Chauhan, 11 Jan 2013
Updated On : 11 Jan 2013
In previous posts I have explained how can we do custom paging and sorting in WebGrid. You can also enhance WebGrid with ajax for asynchronous update of webpage.For making an Ajax WebGrid, we have to set the value of ajaxUpdateContainerId parameter, in which we want to generate the WebGrid. Usually the container should be a DIV as show below:
WebGrid with custom paging and sorting in MVC4
Posted By : Shailendra Chauhan, 11 Jan 2013
Updated On : 11 Jan 2013
WebGrid is simply used to display the data with paging and sorting. If you want to control the default behavior of the webgrid, you need do it manually. In this article, I would like to explore how can we do custom paging and sorting. In this article I have used the MVC4 and Entity Framework 5.0 with VS2012.
File upload with strongly typed view and model validation
Posted By : Shailendra Chauhan, 09 Jan 2013
Updated On : 09 Jan 2013
Many times, we required to upload file with strongly-typed view and also apply validation on uploading file using data annotation validators. In this article, I would like to share, how can we upload a file and validate that file, firstly at client side and after that at server side.
Securing Asp.Net MVC Application by using Authorize Attribute
Posted By : Shailendra Chauhan, 06 Jan 2013
Authorization is the process of determining the rights of an authenticated user for accessing the application's resources. The Asp.Net MVC Framework has a AuthorizeAttribute filter for filtering the authorized user to access a resource.
Controlling Session Behavior in Asp.Net MVC4
Posted By : Shailendra Chauhan, 06 Jan 2013
Updated On : 06 Jan 2013
By default, Asp.Net MVC support session state. Session is used to store data values across requests. Whether you store some data values with in the session or not Asp.Net MVC must manage the session state for all the controllers in your application that is time consuming. Since, session is stored on server side and consumes server memory, hence it also affect your application performance.
Understanding Model View Controller in Asp.Net MVC
Posted By : Shailendra Chauhan, 06 Jan 2013
The Model-View-Controller (MVC) pattern was introduced in 1970s. It is a software design pattern that splits an application into three main aspects : Model, View and Controller. Moreover, MVC pattern forces a separation of concerns within an application or example, separating data access logic and business logic from the UI.
this tutorial really helpss...............
ReplyDelete6 Month Training