to SimpleVB.Net, I hope to share with you some of my
experience as a programmer, where i have managed to
obtain a large amount of code samples for various issues
i have come accross.
When programming most of my time is spent refering back to old code in the past and simply just reusing the same code. Any of the examples on this website should be working and ready for you to just cut and paste into your application. I try and cover all the most common topics from Database connection, File I/O and image manipulation.
I expect most people who use this archive to have a basic knowledge of programming in .Net and probably already have used some of the functions described here, but perhaps cannot find the example they have used before or just want to be able to find it quickly without too much waffle about how the code works.
If you have any queries then please contact me on neil@NOSPAMcrutchlow.co.uk
Sometimes its useful to know what web page has been requested by your web browser.
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.
When using a Microsoft SQL server regularly, you may find that the transaction log can get quite large. If an import is ran every day then the database log file can quickly grow to several gigabytes.
XML is a very flexable file format used to contain data. I often use XML configuration files for applications now instead of a .ini text file, as this type of file is better suited to complex configuration data for your application.
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.
Resizing of images is very important when designing web applications, as you don't really want to have 4 megabyte images displayed on your web pages. Ideally you want to create a thumbnail image of those, and display that. When the user clicks on this image, then display original Image.
Sometimes the standard functions for converting images to jpeg's isn't of a high enough quality. Perhaps you are converting map images or high resolution text documents, where the jpeg artifacts are easily seen.
Many applications require that images are dynamically created especially for the user in websites. I normaly do this when ploting graphs or adding watermarking on images as they are displayed instead of having numerous duplicated saved images on the server.
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.
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.