Posted on: 6/24/2015 3:50:19 PM | Views : 682


I have a code exception. I try to ping some host and an exception occur. I know that the host does't exist and I wanna tell the user that the host doesn't exist. So how to handle the exception? start.aspx
<form runat="server"> <asp:TextBox ID="HostName" runat="server"></asp:TextBox> <asp:Button ID="CheckHostBtn" runat="server" Text="Check" /> <asp:label ID="HostStatus" runat="server"></asp:label> </form> start.aspx.vb
Partial Class RootStart Inherits System.Web.UI.Page Private Sub CheckHost() Handles CheckHostBtn.Click HostStatus.Text = General.PingTest(HostName.Text) End Sub End Class General.vb

Go to the complete details ...