"Scott" <sbailey@mileslumber.comwrote in message
news:ezavRXCRJHA.5092@TK2MSFTNGP05.phx.gbl...
Quote:
I'm trying to capture all form elements posted on a page and concatenate
them into a string for testing and to include in an email message. I'm
getting the below error "Out of string space". I thought using the
"chr(13) & chr(10)" characters at the end of each line would fix the
issue, but it doesn't work.
>
How can I get such a long string concatenated without the below error?
>
' Code: ***********************************
>
<%
sRequestForm = "<TABLE><TR><TD><B>Request Form Values</B></TD>" & chr(13)
& chr(10)
sRequestForm = sRequestForm & sRequestForm & "<TD><B>Value</B></TD></TR>"
& chr(13) & chr(10)
>
For Each s in Request.Form
>
sRequestForm = sRequestForm & sRequestForm & "<TR><TD>" & name & "</TD>"
& chr(13) & chr(10)
sRequestForm = sRequestForm & sRequestForm & "<TD>" & Request.Form(s) &
"</TD>" & chr(13) & chr(10)
sRequestForm = sRequestForm & sRequestForm & "</TR>" & chr(13) & chr(10)
>
Next
>
sRequestForm = sRequestForm & sRequestForm & "</TABLE>"
>
Response.Write "sRequestForm: " & sRequestForm & "<BR>"
%>
>
>
' Error: **********************************
Microsoft VBScript runtime error '800a000e'
>
Out of string space
>
|
Your main problem is doubling up the sRequestFrom like this:-
sRequestForm = sRequestForm & sRequestForm & "<TD>" & Request.Form(s)
Put this in a loop an sRequest form is growing exponentially, I suspect you
meant this to be:-
sRequestForm = sRequestForm & "<TD>" & Request.Form(s)
Similalry with all other occurances of sRequestForm & sRequestForm you
actually only want one sRequestForm.
BTW, drop call the chr(13) chr(10) marlarky the HTML will render find
without them.
--
Anthony Jones - MVP ASP/ASP.NET