<%@ Page Language="vb" AutoEventWireup="false" Codebehind="lookup.aspx.vb" Inherits="aspNetWhoisTest.lookup"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>lookukp</title> <meta content="Microsoft Visual Studio.NET 7.0" name=GENERATOR> <meta content="Visual Basic 7.0" name=CODE_LANGUAGE> <meta content=JavaScript name=vs_defaultClientScript> <meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema> </HEAD> <body MS_POSITIONING="GridLayout"> <form id=Form1 method=post runat="server"><INPUT id=txtHost type=text name=txtHost runat="server"> <INPUT id=Submit1 type=submit value=Lookup name=Submit1> <br><PRE><asp:literal id=WhoisResults Runat="server"></asp:Literal></PRE></FORM> </body> </HTML>
Imports aspNetWhois Public Class lookup Inherits System.Web.UI.Page Protected WithEvents WhoisResults As System.Web.UI.WebControls.Literal Protected WithEvents txtHost As System.Web.UI.HtmlControls.HtmlInputText #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Page.IsPostBack Then WhoisResults.Text = Whois.QueryNow("whois.networksolutions.com", txtHost.Value) End If End Sub End Class