Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27034

VS 2010 Stream adds extra spaces at the end

$
0
0
Happy new year all.

Why does my response add a load of spaces?

I know I can just put trim on the end of my readtoend but what is causing those extra spaces and is there a way to stop it?

Code:

        Dim stream As Stream = request.GetRequestStream()
        stream.Write(data, 0, data.Length)
        stream.Close()

        Dim response As WebResponse = request.GetResponse()
        stream = response.GetResponseStream()

        Dim sr As New StreamReader(stream)

        TextBox7.Text = sr.readtoend


Regards

Viewing all articles
Browse latest Browse all 27034

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>