1 创建Web项目,创建idnex.aspx页
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="UploadFile.index" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
<asp:Label ID="lbMsg" runat="server" Text=""></asp:Label>
<br />
</div>
</form>
</body>
</html&
本文介绍了如何在ASP.NET环境中创建一个Web项目,并实现文件上传功能。通过后台代码处理,解决了上传大文件时可能出现的网页崩溃问题。
订阅专栏 解锁全文
5758

被折叠的 条评论
为什么被折叠?



