1. 创建 web窗体项目
代码如下:
<body><form runat="server"><h2>上传图片</h2><div><asp:FileUpload ID="ful_image" runat="server" /><asp:Button ID="btn_submit" runat="server" Text="提交" /><asp:Label ID="lbl_message" runat="server" Text="Label"></asp:Label></div><h2>展示图片</h2><div><asp:Button ID="btn_show" runat="server" Text="展示图片" /><asp:Panel ID="pn_images" runat="server"></asp:Panel></div></form></body>
效果图如下: