Try
    client = New TcpClient(Session("serverName"), Session("PORT_NUM"))
    'client = New TcpClient(serverName, PORT_NUM)

Catch Ex As Exception

    lblError.Text = alert("Server is not active.  Please start server and try again.", "Server Down")
    btnLogin.Enabled = False

End Try

This code creates a client at login; I need to pass ths client to all my other ASP.net pages in the application and use it for communication to a server.

I need help how to pass it across without declaring it public.

Related posts

Recent Viewed