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.
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.
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.
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.
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.
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.
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.
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.
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.
As you know ASP.NET Core Identity (table structure) is different from what we had earlier in ASP.NET Identity. Actually the identity system which we have today with .NET Core is very mature and continuously evolved be it ASP.NET Membership, ASP.NET Identity 1, ASP.NET Identity 2 and now ASP.NET Core Identity. Recently I had to migrate few application to ASP.NET Core and similar its identity database. Because the table schema is changed, i had to re-think and create migration script which I would like to share with you today. It is very simple and easy, just three step and I had everything ready: STEP 1 : Change name of existing tables STEP 2 : Create ASP.NET Core Identity tables STEP 3 : Migrate data from old tables (ASP.NET Identity) to new tables (ASP.NET Core Identity) Script: https://gist.github.com/itorian/c699e8534b392a6c726ec66c48100072 You should also watch my video, where I demoed migration.
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 .
In this blog post you will learn inner join using lambda queries. There will be two samples, in first sample you will see how you can join two tables and in second sample you will see how you can extend even further to join three tables and so on. I will sample in-memory data, but the same implementation will work with IQueryable (lazy query) too. Here's the code snippet:- namespace ConsoleApp1 { class Program { static void Main() { var table1 = new List<Table1>(); table1.Add( new Table1 { Id = 1, Name = "Name 1" , Address = "Address 1" }); table1.Add( new Table1 { Id = 2, Name = "Name 2" , Address = "Address 2" }); table1.Add( new Table1 { Id = 3, Name = "Name 3" , Address = "Address 3" }); table1.Add( new Table1 { Id = 4, Name = "Name 4" , Address = "Address 4" });