Skip to main content


Showing posts from August, 2011

Chart Helpers in ASP.NET MVC3- Create chart with mvc3

I am exploring ASP.NET MVC3 and everyday I am learning something new. In today’s post I am going to explain how we can create chart with ASP.NET MVC3.

Chart is one of greatest way of expressing figures. We all need that functionality in any commercial application. I am still remembering old days with ASP.NET  where we have to use the third party controls for charts or we have to create it with the use of CSS and Server side controls. But now with ASP.NET MVC Helpers you can very easily create chart in few lines of code.

ASP.NET MVC Chart helper and other helpers comes inbuilt with the latest ASP.NET Tools update. If you don’t have ASP.NET MVC Chart helpers then you can find more information about it from here.

But still if you have not updated it then don’t worry about it. There is nuget package called “ASP.NET Webhelper Library”. You can add that package like following and still use same functionality.

Visual Studio 2010 Features post list on my blog

ILSpy-Alternative of .NET Reflector

Sometimes we need to have decomposer tool or reflector tool for our applications to improve the performance or to know the internals of the assembly we have created. I was using Red Gate .NET Reflector earlier for same as it was free. Now Red Gate has made that tool paid version so I was finding some tools from that I can decompile the stuff. After digging some time on the internet I have found a great tool ILSpy which almost giving same functionalities like .NET Reflector. You can download that tool from following link.

You will get following features in ILSpy. It is also listed on above page.
Assembly browsing IL Disassembly Decompilation to C# Supports lambdas and 'yield return' Shows XML documentationSaving of resources Search for types/methods/properties (substring) Hyperlink-based type/method/property navigation Base/Derived types navigation Navigation history BAML to XAML decompiler Save Assembly as C# Project Find usag…

Creating Basic RSS Reader in ASP.NET MVC 3

In this post I am going to explain you how we can create a basic RSS Reader with the help of Linq-To-Xml and ASP.NET MVC3 Razor. Those who are writing or reading Blogs already knows what is RSS Reader. But those who does not know What is RSS. Below is the definition for RSS as per Wikipedia.

RSS(originally RDF Site Summary, often dubbed Really Simple Syndication) is a family of web feed formats used to publish frequently updated works—such as blog entries, news headlines, audio, and video—in a standardized format.[2] An RSS document (which is called a "feed", "web feed",[3] or "channel") includes full or summarized text, plus metadata such as publishing dates and authorship.

You can find more information about RSS from the following links.
Now let’s start writing code creating a Basic RSS Reader. So first We need two things to create RSS Reader. A RSS Entity class which hold properties for RSS and…

Setting default value for @Html.EditorFor in mvc

Yesterday one of my friend asked me to set default value for @HTML.EditorFor in ASP.NET MVC. So I decided to write this blog post. In this blog post I am going to Explain How we create Default values for model Entities. So Let’s start this via taking a simple example Model class called User. In User Model class I have created two properties UserName and UserJoinedDate. Following is a code for that.
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace CodeSimplified.Models { public class User { private DateTime _userJoinDate = DateTime.Now; public DateTime UserJoinDate { get { return _userJoinDate; } set { _userJoinDate = value; } } public string UserName { get; set; } } } As you can see in above class username is default propertywhile for UserJoinedDate I have used old method of declaring properties. Where I have assign…

Visual Studio 2010 Color Theme Editor- Customize look of visual studio

We have all love Visual Studio 2010 and I am sure you all want to change color for menus, toolbars and title etc. Today I have found one of the most interesting Extension for Visual studio 2010 from which you can manage all this things. Don’t believe me I’m sure you won’t believe but this reality and You can change the look of your favorite visual studio look and feel. There is a new extension called “Visual Studio Color Theme Editor” from which you can do all this stuff. Here is the link for that.

Once you download and install this link a Theme Menu will be added to Visual Studio like following.

There are 8 themes provided by the Default. You can choose any one of them. Lets choose Emerald theme for visual studio and It will look like following.

Isn’t that great?. Even you can also design your own theme also. Click on Theme->Customize colors and then It will popup a dialog like following. where you…

Surround with feature in Visual Studio 2010

Everyday I am discovering something new with Visual Studio 2010 and today Once again I have discovered a new feature called “Surround with” feature. This feature is quite useful when you have very big HTML element and You want to surround it some HTML or ASP.NET element i.e. Suppose there is one very big div there and you want to add update panel for Ajax . So let’s take a Simple Example over there. I am having a div which contain very big HTML in it. Like following.

<div> Very big HTML here. </div>
Now let's put that div into update panel with Surround with feature. You can right click and click Surround With or You can directly have shortcut Ctrl+k, Ctrl +S like following.

Now once you click it It will popup three things. 1) ASP.NET 2) ASP.NET MVC 2 and 3) HTML. You can select element of any of that like following.

I am going select ASP.NET as we want to put Update panel over there. Once you click ASP.NET It will popup elements of Here I have selected up…