Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I am trying to display the datatable values as a pdf file through

Response.Write("")
, but i want to try another one that is stringwriter bcoz its faster than reponse.write

thanks in advance

velsamy A
Posted

1 solution

You'll have to provide a StringBuilder, then send the result of that to Response.Write.
VB
Dim myResponse As New StringBuilder()
Using sw As New StringWriter(myResponse)
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")
    sw.Write("...")

    Response.Write(myResponse.ToString())
End Using
 
Share this answer
 
Comments
avelsamy 28-May-14 0:14am    
working fine Mr.Dave

here what is happening in this line

Using sw As New StringWriter(myResponse).

will u please explain me
Dave Kreskowiak 28-May-14 8:06am    
Click on the word "Using" in Visual Studio and hit F1.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900