文件无法上传但未收到错误。 [英] File not uploading but not getting errors.

查看:106
本文介绍了文件无法上传但未收到错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我已经差不多完成的网站,今天进行测试时注意到它没有上传任何文件或者在我需要的SQL中进行批量插入。这是我的代码隐藏:

I have a site that I''ve almost completed and while testing it today noticed that it''s not uploading any files or doing the bulk insert in SQL that I need it to. Here is my codebehind:

展开 | 选择 | Wrap | 行号

推荐答案

首先想到的是你已经将你的File1放在了一个UpdatePanel中。

UpdatePanels不支持上传文件......这些文件根本无法到达服务器。


-Frinny
First thing that comes to mind is that you''ve placed your File1 in an UpdatePanel.
UpdatePanels do not support the upload of files...the files will simply not get to the server.

-Frinny


Frinny,


对不起,我是asp.net的新手,对UpdatePanels一无所知。这个问题的解决方法是什么?


谢谢,

Doug
Frinny,

I''m sorry but I''m new to asp.net and know nothing of UpdatePanels. What would be a good workaround for this issue?

Thank you,

Doug


嗯如果您不知道UpdatePanel是什么,那么您使用它的可能性很小。所以请忽略我之前的观点。


老实说,在浏览完你的代码之后,我不确定你发布的代码是否会编译。第18行会给你带来麻烦。



你是否试过单步执行应用程序并观察会发生什么事情,看看你是否能弄清楚发生了什么?


-Frinny
Well if you don''t know what an UpdatePanel is then it''s very unlikely that you are using it. So just ignore my previous point.

To be quite honest, after skimming through your code right now, I''m not sure that your posted code would even compile. Line 18 is going to cause you problems.


Have you tried stepping through the application and watching what happens to see if you can figure out what''s going on?

-Frinny


这篇关于文件无法上传但未收到错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆