<%@ Page language="c#" Codebehind="Dns.aspx.cs" AutoEventWireup="false" Inherits="Dns.WebForm1" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <meta content="Microsoft Visual Studio 7.0" name="GENERATOR"> <meta content="C#" name="CODE_LANGUAGE"> <meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> </HEAD> <body> <font size="2" face="arial">This sample demonstrates the use of the PowerTCP DNS Component in the ASP.NET environment. <br> <br> Use Domain Name Servers to resolve: <UL> <LI> An email address to a mail server name. <LI> A host name to a dot address. <LI> A dot address to a list of host names. </LI> </UL> </font> <form id="Form1" method="post" runat="server"> <asp:Label id="lblResolve" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">Resolve:</asp:Label> <br> <asp:TextBox id="txtResolve" runat="server">www.dart.com</asp:TextBox> &nbsp;&nbsp; <asp:Button id="cmdResolve" runat="server" Text="Resolve"></asp:Button> <br> <br> <asp:Label id="lblDnsServers" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">Dns Servers:</asp:Label> <br> <asp:TextBox id="txtDns1" runat="server">206.64.128.5</asp:TextBox> <asp:TextBox id="txtDns2" runat="server">198.6.1.2</asp:TextBox> <asp:TextBox id="txtDns3" runat="server">198.6.1.3</asp:TextBox> <br> <br> <asp:Label id="lblResults" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">Results:</asp:Label> <br> <asp:TextBox id="txtResults" runat="server" Width="467px" Height="108px" TextMode="MultiLine"></asp:TextBox> </form> <font face="arial" size="2">View <a href="dnsaspx.inc">ASPX Page Source</a>. <br> View <a href="dnscs.inc">Codebehind (.cs) Source</a>. <br> <br> <h5> To Use This Project On Your ASP .NET Machine Using Visual Studio 7. </h5> <ul> <li> Be sure to have a registered copy of DartUtil.Dll (COM Dll) on the server. <li> Create a wrapper for the COM Dll by using the tlbimp app. The command should be something like: <br> <code>"C:\Program Files\Microsoft.NET\FrameworkSDK\Bin\TlbImp.exe" DartUtil.dll /out:DartUtilDotnet.dll </code> <br> <li> Start a New Project in Visual Studio 7 named "Dns". Choose C# ASP.NET Web Application. <li> Copy the wrapper dll to the new Project in the Dns/Bin directory. <li> In the Solution Explorer, right click References and choose Add Reference. Select the .NET tab and browse to find your wrapper dll. Add it as a reference. <li> Rename WebForm1.aspx to Dns.aspx. <li> Open Dns.aspx in the editor and click the HTML tag to switch to HTML view. <li> Click the "View ASPX Source" link above. Copy the text from the resulting page and paste this text entirely over the text on Dns.aspx in the editor. <li> Remove the "xmp" html tags from the beginning and end of Dns.aspx. These were used so the HTML wouldn't be parsed by the browser. <li> Click the Design Tab to switch to design view. Double click the button to open the .cs class for editing. Click the "View Codebehind (.cs) Source" link above. Copy the text from the resulting page and paste this text entirely over the text on Dns.aspx.cs in the editor. <li> Click Debug, Start Without Debugging to start the project.</li> </ul> </font> </body> </HTML>