Upload a file/image with form data in MVC

Nowadays I am starting out in ASP.NET MVC, one of the things I struggled with the most was how to upload a file/image with form data in MVC. I googled numerous tutorials and guides that showed me how to do file uploads in ASP.NET MVC, but they all had the POST action only receiving the upload itself, not a form full of data and a file upload.

Read More

Model Validation in ASP.NET Web API

Model in MVC is a representation of our data structure so we need to validate the input data by applying validation on model. Here for that purpose we will implement the data annotation technique for applying model validation in Asp.NET Web API application.

Read More

Client Side Validation using ASP.NET Validator Controls from Javascript

We use the server side control in ASP.NET and for validating them, we use the server validation control. These ASP.NET validation controls provide functionality to perform validation using client script but these are handled at the end of the page by rendered validation script. When we want to post the data by AJAX or JavaScript that time Validation control won’t fire the validation.

Read More

difference between a session and a cookie in ASP.NET

Both cookies and sessions are available in any type of programming language like ASP.NET, and both accomplish much the same task of storing data across pages on your site. However, there are differences between the two that will make each favourable in their own circumstance.

Read More