<% '******************************************************* '* ASP 101 Sample Code - http://www.asp101.com/ * '* * '* This code is made available as a service to our * '* visitors and is provided strictly for the * '* purpose of illustration. * '* * '* http://www.asp101.com/samples/license.asp * '* * '* Please direct all inquiries to webmaster@asp101.com * '******************************************************* %> <% Dim bgcolor, textcolor ' Get values from form and paste together into 2 - 6 character strings bgcolor = Request.Form("bg_red") & Request.Form("bg_green") & Request.Form("bg_blue") textcolor = Request.Form("text_red") & Request.Form("text_green") & Request.Form("text_blue") ' If the strings aren't 6 characters long then ignore them ' This means that not all the pull downs in the group had values entered If len(bgcolor) = 6 Then bgcolor = " BGCOLOR=#" & bgcolor Else bgcolor = "" End If If len(textcolor) = 6 Then textcolor = " COLOR=#" & textcolor Else textcolor = "" End If ' Now all that's left is to show our colorful message which is mostly just HTML %> >
>What color would you like today?
  Red Green Blue
Background Color:
Text Color: