Hey there, this site is pretty old now. I've decided to leave it up as I put a lot of work into it and would hate to see it disappear.

Display Tags For 'asp'

List Of ASP Functions

Neal Grosskopf
9/12/2006 12:00:00 AM
A great list of ASP Functions, many which involve string manipulation

25 Ways To Improve Your ASP Code

Neal Grosskopf
10/5/2006 12:00:00 AM
Great tips on how to improve your asp code. I implemented it on my home page and it appears to be working faster.

404 Redirects in ASP

Neal Grosskopf
8/10/2007 12:00:00 AM
I've finally got around to implementing 404 redirects on my own website. Lakeland.edu has had some really slick code on it for awhile now that allows us to create virtual folders that don't really exist and then redirect users to lower level landing page folders.
I was curious if anybody else had done this so I did a search and found this article on it. I must admit that we though up the 404 redirect on our own without consulting other sites. A great achievement on our part I must say.

Get File Size And Type Using ASP

Neal Grosskopf
3/16/2008 7:02:31 PM

Often times it is nice to add some text after a link on your website to let your users know whether the link goes to a PDF and how large that PDF file is. I've found that manually doing this works but after awhile when that PDF file get updated, the file size next to it is incorrect. It is even possible that the link is no longer a PDF but somebody forgot update the text.

An easy solution to these problems is to create a function within ASP that spits out the file type and the file size after the link to let your users know using asp how large a file is and what the file type is.

How To Get File Size and Type Using ASP

function GetFileSizeType(WhatFile) set fs=Server.CreateObject("Scripting.FileSystemObject") file = Server.MapPath(WhatFile) set f = fs.GetFile(file) intSizeK = Int((f.Size/1024) + .5) if intSizeK = 0 then intSizeK = 1 GetFileSizeType = "("&UCase(fs.GetExtensionName(file))&", "&intSizeK&"K)" set f=nothing set fs=nothing end function

To call this function simply do this:


Checking Plurals With ASP - A Simple Check Plural Function

Neal Grosskopf
3/21/2008 2:34:46 PM

I notice that a lot of database driven websites make easy mistakes by not checking for plural words. An example might be "2 vote" or "1 votes". Here is an example of a function using ASP to check for plurals.

function CheckPlural(input) if input <> 1 then CheckPlural = "s" else CheckPlural = "" end if end function

This function can be called like so:

25 Vote<%=CheckPlural(25)%>

<< Back