ASP.NET MVC

Html.TextBox Conditional attribute in ASP.NET MVC Razor

Here, I will show you how to add conditional attribute to Razor HTML helpers in ASP.NET MVC Razor syntax? For […]

Updated on     Kisan Patel

Store data into Cache in ASP.NET MVC

Storing data into Cache in ASP.NET MVC is not as straightforward as it was in ASP.NET Web Form where we […]

Updated on     Kisan Patel

Cache the Output of the Action Method in ASP.NET MVC

To cache the output of the action method, we can use OutputCache attribute in the action method of the controller. […]

Updated on     Kisan Patel

Validate the Data passed in URL at the routing level in ASP.NET MVC

This tutorial will show you how to validate the data passed in url at the routing level in ASP.NET MVC. […]

Updated on     Kisan Patel

Allow User to Submit HTML or script Data in ASP.NET MVC

This tutorial will show you how to mark a form to not validate the input data for any HTML or […]

Updated on     Kisan Patel

Prevent Cross-Site Request Forgery (CSRF) Attack in ASP.NET MVC

To avoid cross site scripting attack where a request to submitted to the form that is not originally the form […]

Updated on     Kisan Patel

Identity authorization for a particular view/page in ASP.NET MVC

To perform Identity Authorization we need to add identity authentication in our project. Now you can add authentication for whole […]

Updated on     Kisan Patel

ASP.NET MVC – Make Action Method as Anonymous Methods in Secure Controller

To make an action method as a anonymous methods in secure controller, we can make that method as Anonymous method […]

Updated on     Kisan Patel

ASP.NET MVC – Make all Action Methods Secure in Controller

To make all action methods public in secure controller, we just add [Authorize] before the controller starts. [Authorize] public class […]

Updated on     Kisan Patel

Return Plain text or HTML from controller action method in ASP.NET MVC C#

To output any content (plain text or HTML text) from controller, we use ContentResult() like below. public ContentResult OutputContent() { […]

Updated on     Kisan Patel