1) Does ASP have functionality to assign a large block of HTML to a variable? What I am doing is emailing large reports in the body of an email. I am trying to set it up so that all i have to do is assign the body of the email to a variable. I could assign each line of the table to a variale I suppose but is there a way of doing it in one large block? I know PHP has this function, does ASP?
2) I am using the ASPFAQS.COm Shuffle Function but the random numbers generated are the same each time I refresh the page. Is there something wrong with my functions?
Function Shuffle( inArray, needed )
' find out how many input elements there are...
incnt = UBound( inArray )
' then create the output array to be the size requested via the "needed" argument
redim outArray( needed )
' now we will select the number of values specified as "needed"...
For i = 1 To needed
' choose a random number from 1 to our current input array usage size...
choose = Int( incnt * Rnd(1) ) + 1
' put that chosen element into the next slot in the output array...
outArray( i ) = inArray( choose )
' here's the tricky part: Since we just used the "choose" element, we don't need
' it any more...we replace it with the last element of the in-use part of the array!
inArray( choose ) = inArray( incnt )
' and then we (effectively) shrink the array!
' Next time through the loop, there will be
' one fewer elements in the array to choose
' from...because we have (effectively) deleted
' the one just chosen!
incnt = incnt - 1
' return the shuffled output
Shuffle = outArray
Dim pooladdress (10)
pooladdress(0)="1314 3rd street"
pooladdress(1)="1314 4th street"
pooladdress(2)="1314 5th street"
pooladdress(3)="1314 6th street"
pooladdress(4)="1314 7th street"
pooladdress(5)="1314 8th street"
pooladdress(6)="1314 9th street"
pooladdress(7)="1314 10th street"
pooladdress(8)="1314 11th street"
pooladdress(9)="1314 12th street"
sh = Shuffle( pooladdress, 5 )
response.write Int( 5 * Rnd(1) ) + 1
For i = 1 to 5
Response.Write "<LI>" & i & " " & sh(i) & vbNewLine