Ajay Gandhi, C# Corner

Ajay Gandhi

C# Corner

Contact Ajay

Discover and connect with journalists and influencers around the world, save time on email research, monitor the news, and more.

Start free trial

Recent:
  • Unknown
Past:
  • C# Corner

Past articles by Ajay:

Image Slideshow Using JQuery, CSS In MVC 5

I am working @ Pune .Net Development is my passion. I have 7+ years of Experience in C#,WCF,WPF,VB.net,Silverlight, WinForms. Visit My persnal blog at http://ajayrgandhi.blogspot.in/ Currently exploring my MVC , JQuery... Read more → Read More

Automatically Change Image On Some Interval In MVC 5 Using JavaScript

Here are the steps, Step 1: Create basic project MVC with Controller, Model and View. Step 2: Include required query libraries. Step 3: Add image, next button and prev button. Also write JavaScript in the following way. I have set interval as 3 seconds you may change as per your need. → Read More

Bundling And Minification In MVC

This is continuation of my previous articles. I highly recommend to read my previous article at below link, Now in this article we will compare the performance in the application without bundling and minification and application with bundling and minification configured. For this you have to download source code from here, * Using JQuery Accordion Control and Tab Control in MVC * Bundling And… → Read More

Image Sprite Using CSS in MVC 5

What is image sprite in CSS It is a technique to optimize the performance of website / web application in which all the images (mainly icons or header footer images) are combined in to the single image and this single image is loaded and using only a portion of image required for the control is displayed using CSS. What are the benefits of sprite image * Significantly optimize the performance of… → Read More

Delete Selected Rows From Grid With Confirmation Message In MVC 5

I am working for Xoriant solutions pvt- Pune .Net Devlopmet is my passion. I have 7+ years of Experiance in C#,WCF,WPF,VB.net,Silverlight, WinForms. Visit My persnal blog at http://ajayrgandhi.blogspot.in/ → Read More

Update View Using JSON Data In MVC Using AJAX

I am working for Xoriant solutions pvt- Pune .Net Devlopmet is my passion. I have 7+ years of Experiance in C#,WCF,WPF,VB.net,Silverlight, WinForms. Visit My persnal blog at http://ajayrgandhi.blogspot.in/ → Read More

Stepwise Display Multiple Partial View Using JSON in MVC 5

Here are the steps: Step 1: Create the basic structure of your project, View, multiple partial views View Model, Step 2: Create your base Controller as in the following, → Read More

Step By Step Implementing t4 Custom Templates in MVC5 Project

Let’s first understand what a t4 template is T4 templates are the sample code written in the files, this may be View code / controller code / web config code. Whenever you create the MVC project, Controller, View automated code is written by Visual Studio. This code is referred from these templates. If you modify this template code your sample code will get modified (for next time you create the… → Read More

Changing The Image On Previous And Next Button Using Ajax In MVC 5

For the btnPrev and btnNext two different values are given and common Name is given as ButtonType. Both the conditions are manipulated in the controller. And My Final View is as below, → Read More

Changing The Image On Previous And Next Button Using Ajax In MVC 5

Also add Two button Prev and next. My Ajax.BegineForm is as in the following: For the btnPrev and btnNext two different values given and common Name is given as ButtonType. Both the conditions are manipulated in the controller. And My Final View is as in the following, → Read More

Understanding Validation In MVC – Part 5

Let’s understand some more advanced topic in MVC Validation. This article will help you to understand the [ValidateInput()] attribute in MVC. Suppose you are posting some cross site script element as a input to your control then although you are trying to post it, it won’t post or will give error. Let’s check it. Put some HTML code / Java script code as in the following image. Now if you click… → Read More

Compile Time Error Checking In MVC View

Your MVC project won’t give any compilation error unless you do some settings. For the settings .csproj here are the steps, Step 1: Firstly, open your CS Project file from explorer in Notepad. Step 2: You have to open the above selected file into notepad as in the following, Step 3: Search the MvcBuildViews tag default value that is false. Turn it to true and save the file. Step 4: Again go to… → Read More

Stepwise Creating Custom HTML Helper In MVC

We know HTML helpers are like traditional ASP.NET controls. As we create the custom controls we can also create the custom helpers. How to create the custom helpers we will see as in the following steps, Step 1: Create your MVC application. Step 2: Add folder HTMLHelper and class HTMLHelper ( you may give your project a specific name ) Step 3: Now we are creating helper which will convert text… → Read More

Bundling And Minification In MVC

Before reading this article, I highly recommend reading the previous part of the series: Now follow below steps: Step 1: In Web config add bundle module and make sure you have added the dll. Step 2: Register your JavaScript and JQuery bundles Bundle Module as in the following way, In new script bundle mention the bundle name and include section mention the script file names. If version of script… → Read More

Bundling And Minification In MVC

What is Bundling * Bundling is a process of grouping the css / javascript files. * This group of multiple file is combined into a single file. * This single file can be cached. * Intention of bundling is to improve performance / optimization. How my page works without Bundling Without bundling your page downloads each script / css file as below: Consider my example: * Minification is a = process… → Read More

Understanding Validation In MVC

This article focuses on implementing validation summary in MVC and continuation of previous article, Validation Summary Validation Summary helps you to display all your validation error messages in the summary box. It will display all your validation errors in unordered list format. excludePropertyErrors: true to have the summary display model-level errors only, or false. We have the following… → Read More

Understanding Validation in MVC

This article is continuation of previous article, This article focuses on implementing custom validation in MVC. Custom Validation: Custom Validation allows you to create your own validation attribute. For this you need to implement data annotation concept. You need to extend the class ValidationAttribute. Let’s see this class ValidationAttribute is abstract class, has various method which will… → Read More

Understanding Validation in MVC

This article is continuation of previous article, This article focuses on implementing remote validation is MVC. Remote Validation This server side validation helps to call the server action to validate the data. Remote validation helps to validate the data without posting entire form to the server. For example, validating user name. User Name we cannot validate i.e. check is already exist in… → Read More

Understanding Validation In MVC

Types of Validation: * Client Side Validation: Performed at client side no post back. * Server side Validation: Performed at server side post back. Now let’s see Client side Validation: * Specify Required Field Validation: It is commonly used validation. When we want to specify particular field is compulsory in UI we can use this validation. Simply we need to just apply [Required] attribute to… → Read More

Update A Div And Partial View Using Ajax.BeginForm On Form Submit

I am working for Xoriant solutions pvt- Pune .Net Devlopmet is my passion. I have 7+ years of Experiance in C#,WCF,WPF,VB.net,Silverlight, WinForms. Visit My persnal blog at http://ajayrgandhi.blogspot.in/ → Read More