applying function by looping through variable list

Results 1 to 2 of 2

Thread: applying function by looping through variable list

  1. #1
    Join Date
    Dec 1969

    Default applying function by looping through variable list

    how do i loop through a list of variables, and apply a function to each in a loop (instead of indivudually)<BR><BR>for example, right now, i am using the following function, and calling it for each variable:<BR><BR>&#060;%<BR>Function ParseQuotes( _<BR> ByVal strToRenderSafe _<BR> )<BR><BR> ParseQuotes = Replace(strToRenderSafe,"&quot;", """") <BR><BR><BR><BR>End Function<BR><BR>pgOne_province=ParseQuotes(Session ("provinceofRes"))<BR>pgOne_referralMeth=ParseQuot es(Session("referralMeth"))<BR>pgOne_purpose=Parse Quotes(Session("purpose"))<BR>pgOne_purpose_other= ParseQuotes(Session("purpose_other"))<BR>pgOne_ref By=ParseQuotes(Session("refBy"))<BR>pgOne_refByPho ne=ParseQuotes(Session("refByPhone"))<BR>pgOne_Cre ditLimit=ParseQuotes(Session("CreditLimit"))<BR>pg One_soleOwner=ParseQuotes(Session("soleOwner"))<BR >pgOne_CA_rel=ParseQuotes(Session("CA_rel"))<BR><B R>----------<BR><BR>but i would like something that goes through each one and applies the fuction automatically.<BR><BR>what is the best way to do this?<BR><BR>thanks in advance :)

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Hmmm

    Basically you want to go through the session collection that part is easy with a simple for each loop<BR><BR><BR>the issue you will have is putting the value into the variables, the only clean way will be to put the data into an array otherwise for each look you shuold check the session and based on the save to a varaiable<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts