开发者

FileUpload ASP.NET control not working under Windows 7

I have a User Control that contains a System.Web.UI.WebControls.FileUpload control as well as a button to 'Submit'.

When the button is clicked code similar to the following is executed:

If FileUploadControl.HasFile Then
   'Save the file and do some other stuff
End If

This code works just fine with Windows XP. However, if I run it from a Windows 7 64-bit machine using IE8 32-bit the HasFile property always开发者_开发技巧 returns false and nothing is saved?!

Any suggestions/ideas would be greatly appreciated.


I've had such problems with FileUpload control as well (not specifically with Windows 7). Try checking !string.IsNullOrEmpty(fileUploadControl.FileName) instead. I don't know if it will help in your particular case, but I it worked for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜