1. 引用 tessnet2.dll (只有NET2.0版本)

2. 视图页

<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    主页
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%: ViewData["Message"] %></h2>
    <p>
        若要了解有关 ASP.NET MVC 的更多信息,请访问 <a href="http://asp.net/mvc" title="ASP.NET MVC 网站">http://asp.net/mvc</a></p>

<form id="form1" runat="server" enctype="multipart/form-data" action="indexnew" >
    <div>
    <a id="addAttach" href="#">添加上传文件</a>
    <div id="files">

    <input type="file" name="f1"/>

<%--    <input type="file" name="f2"/>--%>

    </div>
   <input type="submit" value="提交" />
    </div>
    </form>
</asp:Content>
View Code

相关文章:

  • 2021-12-30
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-12-03
  • 2021-11-17
相关资源
相似解决方案