Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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>
Posted
Updated 12-Jun-12 0:45am
v2
Comments
Vani Kulkarni 12-Jun-12 7:01am    
Would you please post any error message you are getting?
[no name] 12-Jun-12 7:45am    
when i am using AsyncPostBackTrigger, it not generate error but the fileupload method does not execute.and when i am using Postback trigger it execute the fileupload method but Updateprogress then not execute.

1 solution

 
Share this answer
 
Comments
[no name] 12-Jun-12 7:19am    
when i am using AsyncPostBackTrigger , then fileupload.Hasfile become false.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900