|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Redirect Response.write ouput
I've got a function that I wrote sometime ago that outputs a lot of content via response.write's. At this time I'd like to email everything that the function writes via response.write's. So I was wondering if there is anyway to redirect the response buffer to a string? Is this possible and does anyone know how to do it? Thanks
|
|
#2
|
|||
|
|||
|
I don't think you can redirect the response but a good work around would be to make your own response object and do a string replace "response" with "myresponse" on the code.
You will need a dummy function for every response object function you use in your code. I have only replaced the "write" function use myResponse.getString to get your string Code:
<%
Set myResponse = new resp
myResponse.write "fred"
response.write myResponse.getString
class resp
Dim buffer
public function write(byVal str)
buffer = buffer & str
End Function
public function getString()
getString = buffer
End Function
End Class
%>
__________________
-- ngibsonau |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Redirect Response.write ouput |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|