无法在更新面板中进行FileUpload [英] Unable to FileUpload in update panel

查看:106
本文介绍了无法在更新面板中进行FileUpload的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法上传具有UpdatePanel的以下文件。当它在updatepanel之外的时候,我可以通过showbutton_click完成并且能够看到图像。



I am unable to upload a file in the following that has an UpdatePanel. Ofcourse when it is outside updatepanel I am able to do it through the showbutton_click and able to see the image.

<asp:UpdatePanel ID="UpdatePanel3" runat="server" >
<ContentTemplate>
<asp:Panel ID="Panel117" runat="server"

 style="border-width: 1px; border-style: solid; top: 1475px; left: 125px; position: absolute; height: 161px; width: 279px; background-color:InactiveBorder; border-color:Black">
 <asp:Image ID="ImagePreview" runat="server" Height="97px" Width="99px"  style="z-index: 1"/>
            <asp:FileUpload ID="PhotoUpload" runat="server"

            style="z-index: 1; left:100px; top: 53px; position: absolute; height: 46px; width: 218px; right: 90px;" />
<asp:Button ID="Button7" runat="server" CausesValidation="False"  onclick="Showbutton_Click"

            style="z-index: 1; left: 7px; top: 123px; position: absolute" Text="Show" />
</asp:Panel>
</ContentTemplate>
 <Triggers>
           <asp:PostBackTrigger ControlID="Button7" />
           </Triggers>
 </asp:UpdatePanel>

推荐答案

< asp:postbacktrigger controlid =Button7xmlns:asp =#unknown>



我想你需要触发器中的eventname =click'



或者因为按钮位于更新面板内,ID名称前缀为
<asp:postbacktrigger controlid="Button7" xmlns:asp="#unknown">

I think you need the eventname="click" in the trigger'

Or because the button is inside the update panel, the ID name is prefixed with something like


CT_100_button7



尝试按钮

CT_100_button7

Try in the button
<asp:button xmlns:asp="#unknown">
ID="Button7" 
ClientIDMode="Static" 
runat="server" 
CausesValidation="False"  
onclick="Showbutton_Click"
style="z-index: 1; left: 7px; top: 123px; position: absolute" 
Text="Show" />
</asp:button>





http://msdn.microsoft.com/en-us/library/system.web.ui.control。 clientidmode%28v = vs.110%29.aspx [ ^ ]


这篇关于无法在更新面板中进行FileUpload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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