[thelist] VARIABLE(s): asp/vbscript (referencing/pointers)

Chris W. Parker cparker at swatgear.com
Wed Jun 26 12:10:01 CDT 2002

> -----Original Message-----
> From: Jonathan_A_McPherson at rl.gov [mailto:Jonathan_A_McPherson at rl.gov]
> Sent: Wednesday, June 26, 2002 9:51 AM
> The long answer is that the Eval function is often frowned upon as a
> programming evil (like "goto"), and is rather slow besides. How about
> something like this?
> Response.Redirect("page1.asp?errMsg=C_Err1")
> ...
> var myErrMsg = "Meta-error: No valid error message found."
> Select Case Request("errMsg")
>   Case "C_Err1"
>     myErrMsg = "You cannot type. Also, you smell of elderberries."
>   Case "C_Err2"
>     myErrMsg = "Please fix the errors, or I shall say ... Ni!"
> End Select
> Response.Write myErrMsg

good idea, i will probably go that route. although, the site doesn't get
much traffic and therefore i don't think the Eval() function would cause
any problem with speed. so i'll try eval first.

but still i could just create a function within that included file that
would spit back the string to another variable based on the name of the
variable that was passed (i.e. utilizing the select statement.)

good job on that one.


More information about the thelist mailing list