Gridview中的Fileupload.HasFile始终返回false [英] Fileupload.HasFile in Gridview always returns false

查看:64
本文介绍了Gridview中的Fileupload.HasFile始终返回false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好专家,



FileUpload.HasFile总是在GridView中返回false。我在页面加载中添加了以下内容

Hello experts,

FileUpload.HasFile always return false in GridView. I added below in Page Load

Me.Page.Form.Enctype = "multipart/form-data"



我也在更新面板中添加了


Also I added in update panel

<Triggers>
<asp:PostBackTrigger ControlID="btnSubmit" />
</Triggers>





对我来说没什么用。我错过了一些愚蠢的东西吗?

顺便说一句,我的网格是动态生成的。我在页脚中有一个按钮,表示添加新的空行,并添加在空行中输入的文本。



Nothing works for me. Am I Missing something silly?
By the way my grid is generated dynamically. I have a button in footer which says add new empty row and also adds the text entered in empty row.

推荐答案

嗨通过更改Post back触发器中的ControlID解决了这个问题。我将其更改为GridViewID,其中存在FileUpload。如上所述,我的fileupload是Gridview中的一列



Hi Solved this by changing the ControlID in Post back trigger. I changed it to GridViewID where my FileUpload is present. As said my fileupload is a column present in Gridview

<Triggers>
<asp:PostBackTrigger ControlID="gdvItems" />
</Triggers>


这篇关于Gridview中的Fileupload.HasFile始终返回false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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