April 6, 2009

www.aspnetr.com - .net related Articles

If you are looking for a simple and quick solution for your programming problems please visit, www.aspnetr.com , Its still in beta and will take another week for a fully functional site. The main idea behind this site is to give a spot on solution for all your .net related matters and most preferably ASP.NET.

March 26, 2009

How to get the IP Address and redirect users by country

Download the following dll to get the country by passing IP address. This is a .NET 3.5 library that retrieves the country information for an Internet Protocol version 4 (IPv4) Address, by extending the System.Net.IPAddress class.

http://www.codeplex.com/IPAddressExtensions

 

Then simply add the code in page load method.

if (!IsPostBack) {
            IPAddress ip = IPAddress.Parse(HttpContext.Current.Request.UserHostAddress);
            string country = ip.Country();
            if (country.ToLower() == "india") {
                Response.Redirect("~/indiahomepage.htm");
            }
        }

February 14, 2009

Fusion Charts

Recently I worked on a Dashboard Project which shows Sales, Invoices, ATB and DSO info. Initially I started with Dundas Charts but later we changed to a nice 3D looking charts called "Fusion Charts". Of course Dundas Charts was good enough but I was looking for a better 3D look, therefore I had to switch to Fusion charts. It was very simple but powerful and we use XML as Data Source. If you are looking for a nice 3D graphs for your project you better have look at this.

MVC

ASP.NET MVC Framework, all I can say is are we going back to where we started ? "Spaghetti code". The main idea was to separate server code from HTML in ASP.NET back in 2001. But all I can see in MVC now is code and HTML both mixed each other which reminds me of a classic asp page. Well, I still haven't got time to get into MVC but this is what I can say from the initial look. Of course there could be some reasons ... I guess I will write this in more details once I really get into MVC....

January 3, 2009

Life is so easy with Google and Apple products

Life is so easy with Google and Apple products. Almost all of my official and personal activities in daily life supports by a google or an apple product. I use gmail as my primary emailing software from last 4 years, the experience was amazing. I use Google Gmail, Tasks, Calendar, Reader, Notebook, Doc, Google sites, Chrome and Google News, almost everyday. And Apple on the other hand with IPod and ITunes. I recently bought a IPod nano and the experience was so amazing compare to the earlier IPod version.

December 29, 2008

http://weblogs.asp.net/mhawley/archive/2004/05/11/129824.aspx

http://weblogs.asp.net/mhawley/archive/2004/05/11/129824.aspx

Productivity Tips

As we are moving to a new year, we tend to look for productivity tips which help to improve our productivity. But how many people actually keep continuing? Well, it’s easy to start but hard to continue. I have tried different kind of GTD (Getting things done).

There are plenty of ways where you can manage your Things to do list. A good start would be GTD. But for me I would like to keep things simple. Some of the simple but effective productivity tips which may help you in new year :

· Maintain a simple todo list ( Gmail Tasks)

· Break tasks into small workable items.

· If a task takes 2 min to complete, do it at the same time and do not procrastinating

· Have a weekly review and clear up all the tasks.

Even If its sound so simple, it’s hard to continue. Good luck and have a productive new year!!

Some useful readings :

http://www.lifeoptimizer.org/2007/05/09/top-5-productivity-tips-most-people-know-but-do-not-do/

http://www.davidco.com/

December 23, 2008

Merry X'mas and Happy New year

Well, its been a hectic past two months but slowly settling down. Due to the fact that me and my wife was struggling to settle down in a foreign country and its harder than we initially thought. Hopefully things will settle down in a few weeks, if not in months :-) . I wish all of you a wonderful and prosperous new year 2009 and Merry Christmas.

November 26, 2008

ASP.NET Charts

Recently I've worked with some cool charts for a dashboard project. Dundas and Fusion charts are the best I've seen so far. But guess what, Microsoft has released a FREE chart control for ASP.NET 3.5 I which has similir look and feel to Dundas charts ;-) Havn't tried it yet but I'm excited, mostly becoz its FREE... :-)

August 27, 2008

Generic List removing duplicates

static List removeDuplicates(List inputList)
{
Dictionary uniqueStore = new Dictionary();
List finalList = new List();

foreach (string currValue in inputList)
{
if (!uniqueStore.ContainsKey(currValue))
{
uniqueStore.Add(currValue, 0);
finalList.Add(currValue);
}
}
return finalList;

}


July 4, 2008

Url Rewriting in IIS 7

One thing I like in IIS 7 is the way it supports Url rewriting. Earlier versions of IIS (6,5) does not support ASP.NET HttpModules for urls without a file extenstion. i.e. http://localhost/Products. Even if its doesn't we can hackaround and use it with IIS Error pages.

When there is no file extension in the url, IIS directly processing it with its own ISAPI filter rather than processing it through the ASP.NET handler. But with IIS 7, all we have to do is to add the HttpModule into the IIS web app. All the requests are process through the HttpModule. So if we request http://localhost/Products, it will go through the HttpModule, which we can easily integrate our url rewriting.

June 6, 2008

Coding Styles

Recently our team prepared a coding guideline document to follow in our day to day coding. As always it leads to loads of debates, things like variable naming, method naming and so forth. What I personally like is to keep things very simple. i.e. string name vs string strName, I prefer string name. Consistency in coding is very important, what it mean is we have to follow the same coding style until the project end. Have look at Microsoft's StyleCop

April 16, 2008

March 26, 2008

OpenSocial

Google's common API for Social Web Sites. With standard JavaScript and HTML, developers can create apps that access a social network's friends and update feeds. Read More >>