Tuesday, August 27, 2013

when not to go to the web

I made a goofy one page web forms application for writing copy to text files which looks like so:

 
 

You will notice that I just have a path to a file in a regular input field in lieu of using a file type input field. That is done because of this "problem." Either way, the interface doesn't really make sense in a web context because I am altering a file and not uploading a file. In using this interface via a web browser one would have to know the path to the file at the sever to edit it and the browser is thus rather useless without having access to the server itself. An application that just manipulates flat files should probably be made in WinForms and just run at the appropriate environment. My markup:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
      Inherits="AspectOriented.UserInterface.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
   <head runat="server">
      <title>Write to a .txt file...</title>
   </head>
   <body>
      <form id="form1" runat="server">
         <asp:Label ID="Label1" runat="server" Text="Complete:"></asp:Label>
         <div style="padding: 30px 10px 10px 10px;">
            Write to this .txt file:
            <asp:TextBox ID="TextBox1" runat="server" Text="C:\Tom.txt"></asp:TextBox>
         </div>
         ...this copy:
         <asp:TextBox ID="TextBox2" runat="server" TextMode="MultiLine">
               </asp:TextBox>
         <asp:button runat="server" text="Submit" OnClick="Unnamed1_Click" />
      </form>
   </body>
</html>

No comments:

Post a Comment