Archive for ASP.NET

Displaying Dynamically Generated Images in ASP.NET

Amgad Suliman | 08/06/2009 | 1 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.

Filed Under: ASP.NET

Check If User Name Exists Using AJAX And C#

Amgad Suliman | 26/04/2009 | 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#.

Filed Under: ASP.NET, Mono XSP 2.0

A Wrapper Class For hostip.info’s GeoLocation Service

Amgad Suliman | 18/03/2009 | 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.

What Are ASP.NET Master Pages

Amgad Suliman | 09/03/2009 | 1 Comments

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 [...]

Filed Under: ASP.NET

Displaying Gravatars Using C#

Amgad Suliman | 02/03/2009 | 3 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.

Filed Under: ASP.NET, WinForms

Get a Movie’s Details From IMDb

Amgad Suliman | 23/02/2009 | 3 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 [...]

Filed Under: ASP.NET, Mono 2.0, WinForms

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

Amgad Suliman | 21/02/2009 | 1 Comments

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.

Filed Under: ASP.NET