Step 2. Create a Web Application


In this step, you create a Web application assembly that calls the file I/O assembly.

 Task   To create a Web application

  1. Add a new C# ASP.NET Web application project called FileIOWeb to the current solution.

  2. Add a project reference in the new project that references the FileIO project.

  3. Add a text box to WebForm1.aspx to allow the user to supply a path and filename. Set its Text property to c:\temp\somefile.txt and set its ID to txtFileName .

  4. Add a button to WebForm1.aspx and set its Text property to Read File and its ID to btnReadFile .

  5. Double-click the Read File button and add the following code to the event handler:

     string s = FileIO.FileWrapper.ReadFile( txtFileName.Text ); Response.Write(s); 
  6. Build the solution.




Improving Web Application Security. Threats and Countermeasures
Improving Web Application Security: Threats and Countermeasures
ISBN: 0735618429
EAN: 2147483647
Year: 2003
Pages: 613

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net