<%@ Page language="c#" Codebehind="Ftp.aspx.cs" AutoEventWireup="false" Inherits="Ftp.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 face="arial" size="2">FTP on the Web. This sample demonstrates the use of the PowerTCP FTP Control in the .NET environment. Log in to your ftp server and download a file which will be displayed in a text box. For this reason, it will work better if an ASCII file is chosen.</font> <form id="Form1" method="post" runat="server"> <table> <tr> <td vAlign="top"> <table border="0"> <tr> <td style="HEIGHT: 22px" colSpan="2"> <table borderColor="black" cellSpacing="0" cellPadding="0" width="100%" border="1"> <tr> <td align="middle" bgColor="#9fff00"> <asp:label id="lblTitle1" Font-Bold="true" Font-Size="X-Small" Font-Name="Arial" Runat="server">Login Info</asp:label> </td> </tr> </table> </td> </tr> <tr> <td> <asp:label id="lblHost" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">Host:</asp:label> </td> <td> <asp:textbox id="txtHost" runat="server" Width="263px" Height="24px"></asp:textbox> </td> </tr> <tr> <td> <asp:label id="lblUser" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">User Name:</asp:label> </td> <td> <asp:textbox id="txtUser" runat="server" Width="263px" Height="24px"></asp:textbox> </td> </tr> <tr> <td> <asp:label id="lblPass" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-Small">Password:</asp:label> </td> <td> <asp:textbox id="txtPass" runat="server" Width="263px" Height="24px" TextMode="Password"></asp:textbox> </td> </tr> <tr> <td align="middle" colSpan="2"> <asp:button id="cmdLogin" Runat="server" Text="Login"></asp:button> &nbsp;&nbsp; <asp:Button id="cmdEndSession" runat="server" Text="End Session" Enabled="False"></asp:Button> </td> </tr> </table> </td> <td vAlign="top"> <table> <tr> <td style="HEIGHT: 22px" colSpan="2"> <table borderColor="black" cellSpacing="0" cellPadding="0" width="100%" border="1"> <tr> <td align="middle" bgColor="#9fff00"> <asp:label id="Label2" Font-Bold="true" Font-Size="X-Small" Font-Name="Arial" Runat="server">Info About Last Command</asp:label> </td> </tr> </table> </td> </tr> <tr> <td colSpan="2"> <asp:listbox id="lstHistory" runat="server" Width="352px" Height="118px" Rows="6"></asp:listbox> </td> </tr> </table> </td> </tr> <tr> <td width="100%" colSpan="2"> <hr width="100%" color="#000000" SIZE="2"> </td> </tr> <tr> <td width="100%" colSpan="2"> <table width="100%"> <tr> <td style="HEIGHT: 22px" width="100%" colSpan="2"> <table borderColor="black" cellSpacing="0" cellPadding="0" width="100%" border="1"> <tr> <td align="middle" bgColor="#9fff00"> <asp:label id="lblFileList" Font-Bold="true" Font-Size="X-Small" Font-Name="Arial" Runat="server" Enabled="False">File Listing</asp:label> </td> </tr> </table> </td> </tr> <tr> <td colSpan="2"> <asp:listbox id="lstFileList" Runat="server" Width="100%" Enabled="False" SelectionMode="Single"></asp:listbox> </td> </tr> <tr> <td align="middle"> <asp:Button ID="cmdGetFile" Runat="server" Text="Get File" Enabled="False"></asp:Button> &nbsp;&nbsp;&nbsp;<asp:Button ID="cmdRefresh" Text="Refresh List" Runat="server" Enabled="False"></asp:Button> </td> </tr> </table> </td> </tr> <tr> <td width="100%" colSpan="2"> <table width="100%"> <tr> <td style="HEIGHT: 22px" width="100%" colSpan="2"> <table borderColor="black" cellSpacing="0" cellPadding="0" width="100%" border="1"> <tr> <td align="middle" bgColor="#9fff00"> <asp:label id="lblFile" Font-Bold="true" Font-Size="X-Small" Font-Name="Arial" Runat="server" Visible="False">Downloaded File</asp:label> </td> </tr> </table> </td> </tr> <tr> <td colSpan="2"> </td> </tr> </table> <asp:TextBox id="txtFile" Runat="server" Height="250px" Width="705px" TextMode="MultiLine" Rows="15" Visible="False"></asp:TextBox> </td> </tr> </table> </form> <font face="arial" size="2">View <a href="ftpaspx.inc">ASPX Page Source</a>. <br> View <a href="ftpcs.inc">Codebehind (.cs) Source</a>. </font> </body> </HTML>