简体   繁体   中英

vairable name as value of another variable, ASP classic

i would like to make a function that takes the variable name as a string, check if exist a querystring, or a request.form or a variable with that name and return the value.

function revalue(varName)

   if request(varName) <> "" then
        revalue= request(varName)
    else        
        revalue= "" 
    end if

end function

how can i check if the variable called as the value of varName exist and has a value?

...

else
   if eval(varName) <> "" then
     revalue= eval(varName)
   else
     revalue= ""    
   end if
end if

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM