Category: ASP.NET

Displaying Dynamically Generated Images in ASP.NET

Displaying Dynamically Generated Images in ASP.NET

June 8, 2009 | By | 5 Comments

Sometimes you need to display an image that is not saved in a file. These could be dynamically generated or loaded from a file but were modified. To display them in an Image control you need to create another page that saves the image in its output stream.

Continue Reading

Check If User Name Exists Using AJAX And C#

Check If User Name Exists Using AJAX And C#

April 26, 2009 | By | 11 Comments

You could make sure the user name entered during the registration process of your website is unique before the submit button is clicked using AJAX and C#.

Continue Reading

A Wrapper Class For hostip.info’s GeoLocation Service

A Wrapper Class For hostip.info’s GeoLocation Service

March 18, 2009 | By | 2 Comments

GeoLocation refers to identifying a real-world geographic location of a computer, device or website visitor. There are a many websites that provide this service, some are free and some are not. A populare and free one is hostip.info. It provides country, country code, country flag, city, latitude and longitude of an IP address.

Continue Reading

What Are ASP.NET Master Pages

What Are ASP.NET Master Pages

March 9, 2009 | By | 1 Comment

Master pages were introduced into the .NET Framework in version 2.0. They are web pages that can contain XHTML, server-side controls and user controls just like normal ASP.NET page (with .aspx extension), but with a .master extension. A master page serves as a template for ASP.NET pages that are based on it to help render […]

Continue Reading

Displaying Gravatars Using C#

Displaying Gravatars Using C#

March 2, 2009 | By | 5 Comments

Gravatar is a popular avatar service that links email addresses to the avatar. You do not need to register an account to be able to display gravatars on your site. All you need to do is construct the URL of the image using the user’s email.

Continue Reading

Get a Movie’s Details From IMDb

Get a Movie’s Details From IMDb

February 23, 2009 | By | 8 Comments

A while back when I was developing MoviePlay (a movies database) I wanted to allow the user to get the movie’s details from IMDb (The Internet Movie Database) instead of having him/her enter it manually. IMDb does not provide a way for developers to use their data, so I wrote the code below to screen […]

Continue Reading

How to Get a Web Application’s Directory Path in ASP.NET

February 21, 2009 | By | 1 Comment

I found this question asked a lot in forums so I thought I should answer it here. Getting the physical path of the website can be done using Request.PhysicalApplicationPath. The following code also lists the sub directories of the website and how many files each one has.

Continue Reading

Dictionaries of HTML Codes

Dictionaries of HTML Codes

February 11, 2009 | By | Add a Comment

I wrote this class to help me do some screen scraping programs. It has two Dictionary objects. One contains the HTML codes and their text equivalents and the other contains the numeric HTML codes and their text equivalents.

Continue Reading

Installing the AJAX Controls Toolkit 3.5

Installing the AJAX Controls Toolkit 3.5

February 5, 2009 | By | 2 Comments

The AJAX Controls Toolkit is an open source toolkit developed by Microsoft and the ASP.NET community. The latest version is for .NET 3.5 and it contains 38 client side components used to create Rich Internet Applications.

Continue Reading

2 or More Domain Names Linked to the Same Folder

February 1, 2009 | By | 2 Comments

Most if not all web hosting services allow users to link two or more domain names to the same account to save them the cost of a new account for each domain name. With such accounts, opening any of the registered domain names calls the same default page as the other. The solution is to […]

Continue Reading