How to correctly use the ASP.NET FileUpload control

后端 未结 6 1992
遥遥无期
遥遥无期 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:04

    Adding a FileUpload control from the code behind should work just fine, where the HasFile property should be available (for instance in your Click event).

    If the properties don't appear to be available (either as a compiler error or via intellisense), you probably are referencing a different variable than you think you are.

提交回复
热议问题