VB.NET: Problem with too large XML data

toytoy

Well-known member
Joined
Jul 16, 2004
Messages
46
Programming Experience
1-3
Say when i click on "A" button, my program will receive the large XML data for "A" from the server...

1) However, i will only receive one section of data....
2) Then when i continue to click on "B" button, it will not receive "B" data
instead it will continue to receive the rest of "A" data...

My coding for receiving the data....
VB.NET:
Dim tcpC As New TcpClient
Public Function receive() As String

 Dim ascii As Encoding = Encoding.ASCII
 Dim networkStream As NetworkStream
 Try
   networkStream = tcpC.GetStream()
   Dim bytes(tcpC.ReceiveBufferSize) As Byte
   networkStream.Read(bytes, 0, CInt(tcpC.ReceiveBufferSize))
   Dim ret As String = ascii.GetString(bytes)
   Return ret
 Catch
 End Try
End Function
How to solve the problem of getting large data...

Thanks
 
Top Bottom