I'm not quite sure what direction I should take this; turning off postbacks (via OnClick="return false;") does not seem to work; multithreading might be a possibility but I'm not sure how to go about that here.
At any rate, what I need to do is open a socket on Page_Load (or via a button click, doesn't matter) and send/receive data interactively -- this is essentially a glorified telnet client. What is happening is that when you click the button to send a command, after connecting, it appears the page is reloaded and a new connection is established causing an error due to not being authenticated within the console. Here is the code:
Partial Public Class _Default
Inherits System.Web.UI.Page
Public clientSocket As New System.Net.Sockets.TcpClient()
Public serverStream As NetworkStream
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) ...
Go to the complete details ...