Listing 1: Control Layout: The ASPX page for the sample uses an HTML table to manage the layout of the file input and image controls.

<%@ Page Language="VB" AutoEventWireup="false" 
   CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC 
   "-//W3C//DTD XHTML 1.0 Transitional//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Import Namespace="NUnit.Framework" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <table width="50%">
        <tr>
          <td>
            <asp:Label ID="Label1" runat="server" Text="Select 
              Image:"></asp:Label>
          </td>
          <td>
            <input id="File1" type="file" runat="server" /></td>
          <td rowspan="2" align="center" valign="middle">
            <img id="PreviewImage" alt="" src="" runat="server" /></td>
        </tr>
        <tr>
          <td colspan="2" align="center" valign="middle">
            <asp:Button ID="Button1" runat="server" Text="Upload" />
          </td>
        </tr>
      </table>
    </div>
    </form>
 </body>
</html>