How to correctly use the ASP.NET FileUpload control

后端 未结 6 1993
遥遥无期
遥遥无期 2020-12-09 03:47

I\'m trying to use the FileUpload control in ASP.NET

Here\'s my current namespace setup:

using System;
using System.IO;
using System.Collections.Gene         


        
6条回答
  •  攒了一身酷
    2020-12-09 04:17

    Instead of instantiating the FileUpload in your code behind file, just declare it in your markup file (.aspx file):

    
    

    Then you will be able to access all of the properties of the control, such as HasFile.

提交回复
热议问题