更新进度在Postback trgigger中不起作用 [英] Update Progress not work with in Postback trgigger

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

问题描述

你好,

我正在使用回发触发器和更新进度.但是更新进度在回发触发器中不起作用.


我使用页面中的文件上传器控件,并且还想单击按钮时执行更新进度,并且还保存文件上传器文件.

所以,我该怎么办?

hello,

I am using the postback trigger and update progress. but update progress not work with in Postback Trigger.


i use the file uploader control in the page and also want to do update progress when the button is clicked and also save the file uploader file.

so, how can i do ?

<div align="left">
 <asp:ScriptManager ID="sc1" runat="server"></asp:ScriptManager>
 <asp:UpdatePanel ID="u1" runat="server">
 <ContentTemplate>
<table border="1" width="100%">
<tr>
<td colspan="2" align="center">
    <asp:Label ID="Label1" runat="server" Text="User News Area" Font-Size="Large" 
        ForeColor="Black"></asp:Label>
</td>
</tr>

<tr>
<td colspan="2" align="center">
    <asp:Label ID="lbl_msg" runat="server" Font-Size="Large" ForeColor="Green" Visible="false"></asp:Label>
</td>
</tr>
<tr>
<td align="left">
    <asp:Label ID="Label2" runat="server" Text="Select Department" 
        Font-Size="Medium" ForeColor="Black" ToolTip="Select Department"></asp:Label>
</td>

<td align="left" width="60%">
    <asp:DropDownList ID="drop_dept" runat="server" Font-Size="Medium" Width="95%" 
        AutoPostBack="True" 
        onselectedindexchanged="drop_dept_SelectedIndexChanged">
    <asp:ListItem>Select</asp:ListItem>
    </asp:DropDownList>
</td>

</tr>

<tr>
<td align="left">
    <asp:Label ID="Label3" runat="server" Text="Select User" 
        Font-Size="Medium" ForeColor="Black" ToolTip="Select User"></asp:Label>
</td>

<td align="left" width="60%">
    <asp:DropDownList ID="drop_user" runat="server" Font-Size="Medium" Width="95%">
    <asp:ListItem>Select</asp:ListItem>
    </asp:DropDownList>
</td>

<tr>
<td align="left">
    <asp:Label ID="Label5" runat="server" Text="Upload File" 
        Font-Size="Medium" ForeColor="Black" ToolTip="Select File"></asp:Label>
</td>

<td align="left" width="60%">
    <asp:FileUpload ID="FileUpload1" runat="server" Font-Size="Medium" 
        Width="95%" />
</td>

</tr>
<tr>
<td align="left">
    <asp:Label ID="Label4" runat="server" Text="Enter Message" Font-Size="Medium" 
        ForeColor="Black"></asp:Label>
</td>
<td align="left" width="60%">
    <asp:TextBox ID="txt_msg" runat="server" TextMode="MultiLine" 
        Font-Size="Large" ForeColor="Black" Height="150px" Width="330px"></asp:TextBox>
</td>
</tr>

<tr>
<td align="center" colspan="2">
    <asp:Button ID="Button1" runat="server" Text="Click Here" Font-Size="Large" 
        ForeColor="Black" OnClientClick="return validate()" 
        onclick="Button1_Click"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
                    <asp:UpdateProgress ID="up1" runat="server" AssociatedUpdatePanelID="u1">
                    <ProgressTemplate>
                    <div align="center">
                    <img src="../Admin/images/progress.gif" align="middle" /> Please Wait..
                    </div>
                    </ProgressTemplate>
                    </asp:UpdateProgress>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger   ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>
</div>

推荐答案

如果找不到任何错误,请通过给出的链接.

http://rbailey.wordpress.com/2009/08/20 /asp-net-fileupload-update-panel-update/ [ http://stackoverflow.com/questions/1187953/updateprogessbar-is-not- Working-when-setting-associatedupdatepanelid [ ^ ]
Please go through the link given, if you are not able to find any errors.

http://rbailey.wordpress.com/2009/08/20/asp-net-fileupload-update-panel-update/[^]

http://stackoverflow.com/questions/1187953/updateprogessbar-is-not-working-when-setting-associatedupdatepanelid[^]


这篇关于更新进度在Postback trgigger中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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