Variable | Dynamic The purpose of this application be to make it easier to caputre data from forms. I know when I create
Forms I Hate typing the request.form information in I code, so I decided to write a way to
Dynamically create the request which strip the variable for apostrophes and also the Trims
Can ' t Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' For:D ynamically Generate Variables
'**************************************
Http://www.chernoblechicken.com
Code
Can ' t Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
Terms of Agreement:
By using this code, your agree to the following terms ...
1/may use this code in your own programs (and may compile it into a and distribute it in
Compiled format for langauges so allow it) freely and with no charge.
2/May isn't redistribute this code (for example to a Web site) without written permission the
Original author. Failure to does is a violation of copyright laws.
3/May link to this code from another website, but only if it isn't wrapped in a frame.
4 you'll abide by any additional copyright restrictions which the author could have placed in the code or
Code ' s description.
'**************************************
' Name:dynamically Generate Variables
' Description:the purpose of this applic
' ation is to make it easier to Caputre da
' Ta from forms. I know when I create form
' s I hate typing in all the Request.Form
' Information in me code, so I decided to
' Write a way to dynamically create the RE
' Quest which strip the variable for Apost
' Rophes and also trims the variable
' By:anthony J. Biondo Jr
'
' Returns:returns text which you can cop
' Y and paste into your ASP application.
'
' This code is copyrighted and has ' limited warranties. Please http://w
' Ww.planet-source-code.com/xq/asp/txtcode
' Id.6334/lngwid.4/qx/vb/scripts/showcode.
' htm ' for details. '**************************************
<HTML>
<%
' Dynamically GENERATE REQUEST
' Description:this script would allow Yo
' U to dynamically generate variables for
' The huge forms that no one likes to Crea
' Te.
' How to Use:type in the variable name
' Select QueryString or form and hit SUBMI
' t. To make more variables increase the H
' Ow many count.
'
' Coder:anthony J biondo Jr. (anthonyb@
' inbridesburg.com)
'
' How MANY VARIABLES to CREATE
How_many=50
Mycreate = Request.QueryString ("create")
If mycreate = "" Then
%><title>dynamically Generate variables</title>
<body bgcolor= "#FFFFFF" >
<form method= "POST" action= "dyn_gen_variables.asp?create=1" >
<font face= "Verdana, Arial, Helvetica, Sans-serif" size= "2" ><b>dynamically Generate
Variables </B><BR>
<BR>
Variable Name: </FONT>
<input type= "text" name= "VariableName" >
<BR>
<font face= "Verdana, Arial, Helvetica, Sans-serif" size= "2" >request Type: </FONT>
<input type= "Radio" name= "RequestType" value= "QueryString" checked>
<font face= "Verdana, Arial, Helvetica, Sans-serif" size= "2" >Querystring</FONT>
<input type= "Radio" name= "RequestType" value= "form" >
<font face= "Verdana, Arial, Helvetica, Sans-serif" size= "2" >form </FONT><BR>
<BR>
<input type= "Submit" name= "submit" value= "Submit" >
</FORM>
<%
Else
%>
<title>dynamically Generate variables-done</title>
<font face= "Verdana, Arial, Helvetica, Sans-serif" size= "2" ><b>dynamically Generate
Variables</b></font>-Done<br>
<BR>
<BR>
<%
VariableName = Request.Form ("VariableName")
RequestType = Request.Form ("RequestType")
MyCounter = 0
Do While MyCounter < How_many
Myvaroutput = myvaroutput & variablename & mycounter & "= replace (Request." & RequestType & "(" & Chr
(&a)