Posts

Showing posts from 2013

Logging Database Operations in Entity Framework 6 - EF6 New Feature

Image
In this blog post you will learn a new feature ‘Logging Database Operations’ introduced with Entity Framework 6. This features works for models created with Code First or the EF Designer.

Seeding ASP.NET Identity Database

In this post you will learn how to seed User’s Profile database tables (AspNetUsers and UserProfileInfoes, we created in last post) with dummy data.

Customizing User's Profile to add new fields in brand new database table

Image
In this post you will learn how to customize User’s Profile and add new fields/properties/columns (FirstName, LastName and EmailID) in a brand new table with ASP.NET Identity System.

Customize User's Profile in ASP.NET Identity System

Image
Note: You should read this post instead, I found below walkthrough will not work on ASP.NET Identity 2. I will re-work on this post soon. In this post you will learn how to customize User’s Profile and add some more fields like FirstName, LastName, EmailID etc with ASP.NET Identity System. In my last post I listed some of the great new features introduced with Identity system .

ASP.NET Identity System in Visual Studio 2013 - New Feature

Image
In this post you will learn about a very new enhancement in ASP.NET Framework technologies (MVC, Web Forms, Web Pages, Web API and SignalR) known as ‘ASP.NET Identity System’ with the release of Visual Studio 2013. This enhancement well defines the meaning of ‘One ASP.NET’, because this can be used with all ASP.NET Framework technologies more easily than before.

Visual Studio Online Monaco Code Editor Walk-through - Part 2

Image
In the part 1 of this series you learned how to edit compiled websites using Visual Studio Online Monaco Editor. Now in this part you will learn how to edit source code of website. Read my previous post or at least first paragraph of that post.

Visual Studio Online Monaco Code Editor Walk-through - Part 1

Image
In this post series I will show you how we can take advantage of Visual Studio Online “Monaco” to edit codes (HTML, CSS, C#, JavaScript etc) in the browser out of the box.

Multiple identity columns specified for table 'States'. Only one identity column per table is allowed

Image
This post addresses the error that we see when executing Update-Database command inside Package Manager Console. I am going to talk about two continuous error appears and fix is very simple, just read this blog.

Custom Code First Conventions - EF 6 New Feature

Image
In this blog post you will learn a new feature ‘Custom Code First Conventions’ introduced with Entity Framework 6. This is 'Code First' only improvement. EF 6 comes with number of cool new features and improvements, so I decided to write blog posts and cover some of the new features.

Entity Framework 6: New Features

In this blog post you will see the list of cool things available with Entity Framework 6. Entity Framework is Microsoft's recommended data access technology for new applications. EF team recently announced the release of EF6 and it is now available for download on NuGet . EF6 comes with number of features and performance improvements, I have listed some of them below and I will cover most of the cool things of EF6 in coming blog posts.

Area in MVC 5 with example - step by step

Image
In this post you will learn how to create Area in MVC 5, because creating Area in MVC 4 was quite different. In MVC 5 (Visual Studio 2013), Area option can be found under ‘Add Scaffold’ dialog. In this post, I will take you through step by step to setup and running Area in MVC 5. "Area in MVC 4" is available here.

Debugging MVC with Route Debugger Tool

Image
In this blog let's talk about a really cool tool for MVC developers ‘Route Debugger’. Sometimes a bug in your route can break application because it invokes either an incorrect controller or action. So, do not worry just install this tool in the application and it will make your route debugging easier like never before.

Category and Sub Category in single Drop Down List (DDL) in MVC

Image
In this article you will learn how to create a Drop Down List in MVC that can display States and its associated Districts in a single Drop Down List. You will learn this step by step.

Hands on ASP.NET GridView - eBook by me

Image
I would like to take this opportunity to let you know that C# Corner (MindCracker Community) have combined my 25 Articles on GridView series and published as an eBook with the title "Hands on ASP.NET GridView".

IIS Express immediately shutting down, hence web application stops running, on click 'Stop Debugging' in Visual Studio 2013 IDE

Image
I'm not sure why this change in 2013 IDE for web applications, it was completely different in Visual Studio 2012. In 2012 IDE, when we click on 'Stop Debugging', then IIS Express was continued running hence after any change in web application we just 'Build Solution' (Ctrl + Shift + B) and refresh the browser (specially Chrome). But now in Visual Studio 2013 things where little changed, when we click on 'Stop Debugging', then IIS Express stops running and hence web application also stops running. Let me tell you I didn't make any changes in settings J

Named Routes in MVC

Image
In this post you will learn what are ‘Named Routes’ and how to use them to generate URLs. I will explain this using problem and then solution approach.

Route Constraints in MVC

Image
In this post you will learn how to define ‘Route Constraints’ in MVC Application. Route Constraints allow us to apply a regular expression to a URL segment to restrict whether the route will match the request.

Getting Started with jQuery.tmpl (jQuery Templates) in MVC

Image
In this post you will learn how to use jQuery.tmpl (jQuery Template) JavaScript library in MVC for client side templating. I will take you through few easy steps to setup it and working.

Scaffold your ASP.NET MVC project with the MvcScaffolding package: Video

In this video you will learn how to scaffold the CRUD/Controller/DbContext using MvcScaffolding package developed by Scott Hanselman and Steve Sanderson.

Mustache.js - Getting Started with Mustache.js in MVC: Video

Image
In this video post you will learn how to use Mustache.js JavaScript library in MVC for client side templating.

Getting Started with Mustache.js in MVC

Image
In this post you will learn how to use Mustache.js JavaScript library in MVC for client side templating.  I will take you through few easy steps to setup it and working.

Enabling Client Side Validation on Custom Data Annotations with IClientValidatable in MVC

Image
In this post you will learn how to create or enable client side validation on the custom data annotations. If you go through my last blog, you will learn how to create custom data annotations to enable server side validation, I also recorded a video for this and uploaded on YouTube . This blog will take you further, so go and read or watch video, if you missed.

Working with Azure BLOB Storage in MVC

Image
In this post you will learn following things: i) Introduction to BLOB Storage ii) Installing the Azure SDK iii) Creating MVC Application (Web Role) to upload BLOBs (for example, images) and delete BLOBs iv) Publishing to Windows Azure (Storage and Web Role)

Custom Data Annotations or Custom Validation Attributes in MVC: Video

In this video will learn how to create custom data annotation in MVC. MVC framework has great extensibility feature and because of this we can create our own customized data annotation attributes.

Globalization and Localization of Model Validation Message in MVC: Video

In this video you will learn how to globalize and localize the model validation message in MVC Applications. At the end, you will also learn how to display the localized message (greeting) on the web page.

Custom Data Annotations or Custom Validation Attributes in MVC

Image
In this post you will learn how to create custom data annotation in MVC. MVC framework has great extensibility feature and because of this we can create our own customized data annotation attributes.

Globalization and Localization of Model Validation Message in MVC

Image
In this quick post you will learn how to globalize and localize the model validation message in MVC Applications. At the end of this post, you will also learn how to display the localized message (greeting) on the page.

Microsoft MVP: Honored to have received the Microsoft MVP award for the 2nd year

Image
Do you know, 1st July has a very special meaning to me, this day starts with full of expectations which lasts until the moment of receiving email from Microsoft. Today, once again Microsoft awarded me with the MVP (Most Valuable Professional) award for the 2nd time in a row in the ASP.NET/IIS category. I'm honored to be the part of Microsoft MVP Program, this is one of the most prestigious award and one of the great achievement of my life. Here is the body of the mail that I received: Dear Abhimanyu Kumar Vatsa, Congratulations! We are pleased to present you with the 2013 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in ASP.NET/IIS technical communities during the past year. I'd like to thanks to my all friends, family, community, blog readers and also like to send my special thanks to Shivprasad K

What are Default Model Binding and Explicit Model Binding in MVC?

Image
Model Binding is a great feature we use today with Web Forms and MVC. In this post you will learn what are Default Model Binding and Explicit Model Binding in MVC. I will use few code snippets in this post so that you can understand it quickly.

What is Eager Loading and what is Lazy Loading and what is N+1 Problem in Entity Framework

Image
In this post you will learn what Eager Loading is and what Lazy Loading is and how this works in the application, and how you can take its advantages.

Instant StyleCop Code Analysis How-to by Franck LEVEQUE - A Book Review

Image
The very nice people at PACKT Publication recently asked me to write a review of their new book StyleCop Code Analysis , and you know I never miss the changes to learn things when it is for free J . Yes you heard it right, I received this book from publisher for free.

View without Controller Action in MVC

Image
In this quick post you will learn how a view can be rendered without its native Controller Action method.

What is Model and ViewModel in MVC Pattern?

Image
Model and ViewModel are two things we always hear in MVC. And in this post I am going to show you the differences between them.

Windows Authentication in MVC4 with IIS Express

Image
MVC4 gone through some major changes in Windows Authentication functionality with IIS Express. In this article you will learn how to enable Windows Authentication in MVC4 Web Application on IIS Express, just follow the given steps.

I Am Now The Published Author of Instant Razor View Engine How-To

Image
I am happy to announce the release of my book ‘ Instant Razor View Engine How-To ’, published by PACKT; and now available at Amazon for purchase. Click on the image to enlarge. Amazon: http://www.amazon.com/dp/1849696306/?tag=packtpubli-20 Packt Publication: http://www.packtpub.com/razor-view-engine/book Like us on Facebook here: https://www.facebook.com/RazorViewEngine

Three ways to populate selected value in DropDownList on Edit or Update views - MVC

Image
I have been asked this question many times that ‘how to populate/activate selected value/item (which I selected while inserting/adding new record) in Edit/Update mode’. I’m going to address few possible approaches here.

Visual Studio 2012 and .NET 4.5 Expert Development Cookbook - A Book Review

Image
In this post you will find my review notes and links to purchase this book. I am feeling very proud to be the reviewer of this book and will recommend everyone to purchase it.

Populate Selected Item in DropDownList in Edit Mode MVC

Image
Within last few days I received many questions on this title, so I decided to address this by a new blog entry. I am going to show you the best possible way to achieve this using Code First approach. Here is what we are going to achieve.

Nested Collection Models in MVC to Add Multiple Phone Numbers - Part 3

Image
This is Part 3 of the article series. Actually, in this article series we were developing an MVC application that will allow adding multiple phone numbers using Nested Model concept. User will be able to add or remove (zero or more phone numbers, I need minimum two phone numbers for each employee) phone numbers for any single employee.

Using Microsoft SQL Server Management Studio to connect SQL Azure databases

Image
In this article you will learn how to connect SQL Azure database from SQL Server Management Studio.

Nested Collection Models in MVC to Add Multiple Phone Numbers - Part 2

Image
This is Part 2 of the article series.  Actually, in this article series we were developing an MVC application that will allow adding multiple phone numbers using Nested Model Concept. User will be able to add or remove ( zero or more phone numbers, I need minimum two phone numbers for each employee ) phone numbers for any single employee.

Nested Collection Models in MVC to Add Multiple Phone Numbers - Part 1

Image
In this article series, you will learn how to create MVC application that will allow adding multiple phone numbers using Nested Model Concept. User will be able to add or remove (zero or more phone numbers, I need minimum two phone numbers for each employee) phone numbers for any single employee.  Also in later posts, I will show you how to List, Edit, Delete record(s) in such nested (relational) models concept.  Here is the first look of the concept.

ASP.NET MVC Online Training by Abhimanyu Kumar Vatsa

Area in MVC - giving a nice physical structure & dealing with template bug

Image
In my last blog post I talked about ‘ retrieving views from different folders in MVC ’ and it works cool when we want view pages always inside Views folder (which is on the project root) but our requirement not ends here. The new version "Area in MVC 5" is  available  here.

Retrieve Views from Different Folders in MVC

Image
In this post you will learn how to retrieve the views which is inside another folder. For example a view which is inside folder Views|Application|General|Index.cshtml. How will you map it or use it from controller? Is this possible?

Code First Approach & Database Migration & Server Side Validations & Client Side Validations in MVC4: Video in Hindi

Image
In this video you will learn how to create simple Feedback Submission Form. In the journey, I will explain the use of Code First Approach and Code First Database Migrations and also Sever Side Validations and Client Side Validations to validation the data entered by the user.

Client Side Username Availability Checking in MVC

Image
It is often required live ‘username’ checking on user registration page in web applications. Today I developed this for my one of the web application and would like to share that with you.

Logging Errors with ELMAH (Error Logging Modules And Handlers) in MVC 4

Image
ELMAH is an alternative to HMS (Health Monitoring System) for logging errors which is free and available under open-source which is created and managed by Atif Aziz . HMS was ( was...why? ) great ( with few pains ) because it has option to capture all events as well as errors. With HMS developers has to design the UI for viewing the log information but with ELMAH, you just need to hit a URL to view log information.

Removing or Customizing View Engines in MVC

Image
In this article you will learn how to remove or customize View Engines which is not being used by application.

Enable Password Resetting with Simple Membership in MVC 4

Image
In this article you will learn how to enable password resetting (in case user forgot the password) with Simple Membership in MVC. User needs to type his username and system will check its existence, if found correct this will send an email containing dynamically generated URL with username and password reset token.

Output Caching in MVC

Image
In this article you will learn everything about ‘Output Caching in MVC’. I will take you by showing some real examples to make your view crystal clear.

Best way to prevent Cross Site Request Forgery Attacks in MVC 4

Image
In this article you will learn what CSRF is and best way to prevent such attacks. After a quick introduction about CSRF I will show you an example where attacker will change the profile information with one-click.

Avoiding Cross-Site Scripting (XSS) Attacks with AntiXSS in MVC 4

Image
In this article you will learn how to avoid XSS attacks in MVC Application with Microsoft’s AntiXSS library. I will show you a case where user will submit the  malicious  HTML markup with message and it will start displaying annoying alert. Then I will move on and show you how to prevent it with AntiXSS.

jQuery UI Autocomplete with JSON in MVC 4

Image
In the last post jQuery Ajax GET and POST calls to Controller's Method in MVC we saw an example on ‘ GET call with parameter to Controller’s Method which will return JSON data ’ (in case you missed, go and read that before continuing here), let me put the screenshot here.

jQuery Ajax GET and POST calls to Controller's Method in MVC

Image
In this blog post I am going to cover some really interesting stuff which is very useful today in web application developments. You will learn how to make jQuery Ajax GET and POST calls to controller methods.

Ajax.ActionLink and Html.ActionLink in MVC

Image
In this post you will learn use of Ajax.ActionLink helper and Html.ActionLink. I will compare both to show you how it is different. Okay, let’s begin with Html.ActionLink.

Quick Search, Replace and Navigate in Visual Studio IDE (A Must Read Post)

Image
I would call this post as Tips/Tricks post because this post contains information about Visual Studio IDE features. I can see large number of developers are not familiar with these features. So, I thought writing a blog post collecting searching, replacing and navigating tips which is vital to happy and productive.

Cascading DropDownList in ASP.NET MVC

Image
In this blog post you will learn how to create cascading DropDownList in ASP.NET MVC. I will take you through step by step approach so, let’s begin.

Custom Validation with IValidatableObject in MVC

Image
In this post you will learn how to create a self validatable object using IValidatableObject to validate data in MVC.

DropDownList Helper Data Binding in MVC

Image
In this post you will learn how to bind data to a DropDownList helper in MVC. We will try binding data to a DropDownList from a List<SelectListItem>, a List<Model> and also from a database.

Building NerdDinner.com MVC Application: Videos

Image
Hello Folks. The videos listed in this post are not mine, these are recorded by Microsoft people for the community. I hope this can be useful.

Adding metatags on .cshtml pages in MVC

Image
This quick post is a response to a question I received today on Facebook. Please follow the steps to add metatags on .cshtml pages:-

Happy New Year - 2013

Image
Hello Friends! Happy New Year to all of you, may your new year be blessed with peace, love and joy. I’m sending you my heartfelt wishes with joy that never ends. It’s time to forget all the past and think ahead.

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System