protected void Button2_Click(object sender, EventArgs e) { try { socketMgr.CloseServer(); Button2.Text = "Server Stopped"; } catch (Exception ex) { Label2.Text = ex.ToString(); } }