Active Server Pages

Self-referencing in VBScript

15 Feb 2007

Does anybody actually develop in VBScript anymore? If you did ASP development, you likely did so in VBScript. ASP was the first server-side language I got into heavily. It took me learning Java and all the object-oriented programming concepts that go with it before I looked to see if the same thing could be accomplished with VBScript. While the OOP features in VBScript are pretty minimal, you ca...

Read it all ?

Rounding Integers Proves Troublesome

16 Dec 2005

Here's the situation: I have something that is 149.95 and I want it to be represented as 14995. So, using VBScript, I take the number and multiply it by 100. On the off chance I got a number that included more than two decimal places, I wanted to lose any decimal points that might exist. VBScript has a function Int that can do just this. Every now and then, though, that whole number ends up being ...

Read it all ?

CDOSYS The Different SendUsing Options

04 Feb 2005

There are two different ways that you can send e-mails using CDOSYS (aka CDO for Windows 2000): Using an SMTP server Using a pickup folder Using an SMTP server Using an SMTP server is probably the most common approach that people use to send out e-mails. Each time you send an e-mail it communicates with the server and sends out your e-mail. This is great for just a few e-mails but if you have...

Read it all ?

CDOSYS (CDO for Windows 2000)

21 Apr 2004

Here's a code block for sending out an e-mail using CDOSYS. ' create the e-mail set o_msg = createobject("cdo.message") set o_conf = createobject("cdo.configuration") With o_conf.Fields .Item(" /cdo/configuration/sendusing") = 2 .Item(" /cdo/configuration/smtpserver") = mailserver .Update End Wit...

Read it all ?

CDO for Windows 2000

29 Oct 2003

Okay, sometimes I feel out of date. The last time I tried developing for CDO was under NT4 and to put it bluntly: it sucked. It didn't offer any flexibility and a number of ISP's that I worked with didn't support it. So I've been using custom SMTP objects like ASPMail ever since. Well, it seems there's CDO for Windows 2000 that should do the trick. There's not a lot of tutorials out on the web tha...

Read it all ?

Send E-mail from ASP without a COM object

29 Oct 2003

For those that have IIS's SMTP service running on the same machine as your Web server, you can send out e-mail's without using a COM object. The SMTP service monitors the c:\inetpub\mailroot\pickup\ folder (based on a default installation) for new messages. Simply create a new text file in this folder that meets the RFC822 e-mail format. It should be zapped into the system and an e-mail will be ...

Read it all ?

VBScript code to replace text NOT in HTML tags

01 Nov 2001

I had been looking for a solution to this problem for a little while and there was a post on ASPMessageboard that got me started. It pointed me to an article on 4GuysFromRolla that included a function as well as some search criteria. First the function: Function RegExpReplace(strInput, strPattern, strReplace) ' Use <?> to indicate the match you wish to replace ' Create and setup severa...

Read it all ?

Reading parameters of a Macromedia Flash (SWF) file using ASP

31 Oct 2001

Ever wanted to read the properties of a SWF file such as height and width? Well, I did. was a good starting point for me. They have a SWF parser written in C++ that can grab all the information you need. There are also a number of server-side objects that can do the trick as well. However, I needed a solution that would work without any custom server-side objects. So, I went on my mer...

Read it all ?