Archive for Mono 2.0

Check If User Name Exists Using AJAX And C#

April 26, 2009 | 11 Comments

ajax01

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#.

Read more…

Filed Under: ASP.NET, Mono 2.0

Simple Networking Tasks in C#

March 27, 2009 | 9 Comments

Developing applications in C# that access resource on the internet is easy. This post shows four useful functions: checking if the PC is connected to a network, domain name to IP address lookup, ping a host and download a file.

Read more…

Filed Under: Mono 2.0, WinForms

A Wrapper Class For hostip.info’s GeoLocation Service

March 18, 2009 | 2 Comments

hostip

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.

Read more…

Filed Under: ASP.NET, Mono 2.0, WinForms

Get a Movie’s Details From IMDb

February 23, 2009 | 7 Comments

imdb

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 scrape or web scrape the details from the movie’s page. It gets the title, director, genre, release year and tag line of the movie as well as the thumbnail.

Read more…

Filed Under: ASP.NET, Mono 2.0, WinForms

2 or More Domain Names Linked to the Same Folder

February 1, 2009 | 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 write a Response.Redirect() call in the default page (usually Default.aspx) to redirect the user depending on the domain name entered.

Read more…

Filed Under: ASP.NET, Mono 2.0

Reading and Writing Text Files in C#

January 24, 2009 | 0 Comments

With all the DBMSs out there, text files are still widely used when developing applications. They are small, fast and do not require any library or application to be installed in the client machine. The System.IO.StreamReader and System.IO.StreamWriter are used to read and write text files to disk.

The following code demonstrates reading a file selected using the OpenFileDialog control and saving to a file using the SaveFileDialog control. The code works with the .NET Framework and Mono 2.0 and later.

Read more…

Filed Under: Mono 2.0, WinForms