<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

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

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>动态上传并显示图像</title>
    <style type="text/css">
        .style1
        {
            width: 153px;
        }
        .style2
        {
            font-family: 华文行楷;
            font-weight: bold;
            font-size: xx-large;
            color: #FF9900;
            border-left-color: #ACA899;
            border-right-color: #C0C0C0;
            border-top-color: #ACA899;
            border-bottom-color: #C0C0C0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table align="center" style="width: 500px">
            <tr>
                <td align="center" colspan = "2">
                    <span class="style2">动态上传并显示图像</span>  
                    <br />
                    ----------------------------------------------------------------------------</td>
            </tr>
            <tr>
                <td class="style1">
                    选择上传的图像：</td>
                <td>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                </td>
            </tr>
           <tr>
                <td align="center" colspan = "2">
                    <br />
                    <asp:Button ID="Button1" runat="server" Text="上传图像" onclick="Button1_Click" />
&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Button2" runat="server" Enabled="False" Text="显示图像" 
                        onclick="Button2_Click" />
                </td>
            </tr>
              <tr>
                <td  colspan = "2">
                    显示上传的图像：</td>
            </tr>
              <tr>
                <td colspan = "2" align="center">
                    <asp:Image ID="Image1" runat="server" Height="200px" Width="300px" 
                        Visible="False" />
                  </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
