Get requested webpage URL with

June 18, 2011 - 13:35

Sometimes its useful to know what web page has been requested by your web browser.

Geocode with google maps api in ASP.Net

June 17, 2011 - 06:52

I have spent many hours trying to find a free way to do postcode lookups and obtain the longitude and latitude. A few websites provide this service, but unfortunately i have found that after a few months the websites no longer work, or restrict the number of lookups each day.

Change the document type using MIME

June 11, 2011 - 06:35

When any webpage is returned back to the browser a type is specified which indicates what type of document is being returned. Normally this would be a standard html document and this is rendered in the browser.

Case insensitive replace on a string

June 8, 2011 - 13:01

I'm sure everyone is familiar with the replace function which replaces all occurances of a string with another string, however this can also be done with the same function but ignoring the case of the compare string.

Setup a 301 permanent redirect using

June 8, 2011 - 08:32

A permanent 301 redirect is very usefull if you have recently moved or redesigned your website. Search engines will have references to your old pages and also any links from other websites may refer to your old pages. To keep any search engine ranking then you must add this redirect, and over time all the references will update to your new pages.

How to compress webpages with gzip using global.asax

June 7, 2011 - 12:46

Almost all modern webbrowsers support gzip compression, and its recommended to use this to reduce the size of webpages which in turn can dramatically reduce the download time.

Remove HTML tags from string with RegEx

June 6, 2011 - 09:02

If you have done a scrape of some data from a webpage, then the obtained string could contain lots of HTML tags such as HREF entries or font formatting. This may not be desirable when that information is displayed on your own site.

Set and retrieve cookies in ASP.NET

June 4, 2011 - 12:50

You may wish to set cookies on your webpage which are usefull for things like login areas. This can be done with session variables, but i find those to be less reliable and are regularly cleared when new files are uploaded to the server.

Read in the contents of a webpage to a string.

September 2, 2010 - 07:20

You may wish to display the contents of a feed from another website or grab data from another website and perform some processing on this information and then redisplay on your own site.

How to dynamically create a word document in ASP.NET

July 31, 2010 - 05:30

The easiest way i have found to generate a word document from website content is to use the feature of word to read in HTML documents and display as a normal word document.

  • 1

© 2011