Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Experts,

I have got one strange problem.
In one of my aspx page i have got file uploading control.
for this am adding save button in update panel post back trigger.
My sample code
ASP.NET
<asp:UpdatePanel ID="udpSearch" runat="server" UpdateMode="Conditional">
<table>
<tr>
<td>
<asp:Button ID="btnSave" runat="server" />
</td>
</tr>
</table>
<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>

But on clicking save button the entire page is blinking .
so can any one please help me to solve this issue.

thanks in advance
(Keerthi Kumar)
Posted
Updated 2-Apr-20 23:25pm
v3
Comments
abdul subhan mohammed 20-Jul-14 16:12pm    
Can u plz expand it more,
means,
what u want to do after clicking on d save button,
or how many save buttons are there separate for each line like in grid or repeater,
or how it is.
Keerthi Kumar(Andar) 21-Jul-14 1:05am    
My Page design is something like this
Onlick of Save button page is looking like blinkd one

<asp:UpdatePanel ID="udpSearch" runat="server" UpdateMode="Conditional">
<contenttemplate>
<table>
<tr>
<td>
<asp:Button ID="btnSave" runat="server" />
</td>
</tr>
</table>




<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
</Triggers>
DamithSL 21-Jul-14 1:22am    
remove the post back trigger and try again.
Keerthi Kumar(Andar) 21-Jul-14 1:24am    
I have added post back trigger purposefully. Because am using file upload control in this page. If i remove post back trigger its working fine...but i want post back trigger in my page.

I guess you are looking for AsyncPostBackTrigger.
 
Share this answer
 
Comments
Keerthi Kumar(Andar) 21-Jul-14 1:34am    
ya... Is it possible to use file uploading control without using postback trigger???
dan!sh 21-Jul-14 1:43am    
Yes it is. In fact standard FileUpload control does not really support partial postback from what I remember.
Keerthi Kumar(Andar) 21-Jul-14 1:50am    
can u please tell me how to upload a image using file upload control.
without using post back trigger on upload button
dan!sh 21-Jul-14 1:52am    
Just don't use any update panel. Why do you want update panel anyways?
Keerthi Kumar(Andar) 21-Jul-14 1:57am    
am using some code behind validation in this page.
If don't use update panel for each and every request page is not looking good that's why
am using update panel
check below article
File Upload in Update Panel[^]
 
Share this answer
 
Comments
Keerthi Kumar(Andar) 21-Jul-14 1:40am    
Same thing am doing.
But on click of save button.once the page will look as a blank page.
then the controls will appear on the page.
DamithSL 21-Jul-14 1:44am    
it is not the same, check below lines
<asp:PostBackTrigger ControlID="btnUpload" />
<asp:AsyncPostBackTrigger ControlID="btnProcessData" />
Keerthi Kumar(Andar) 21-Jul-14 1:48am    
<asp:AsyncPostBackTrigger ControlID="btnProcessData" />
this used to show uploading is under process.
DamithSL 21-Jul-14 2:03am    
do the same in what you doing in btnSave currently on AsyncPostBackTrigger.
Keerthi Kumar(Andar) 21-Jul-14 2:24am    
if i use AsyncPostBackTrigger on btnSave Button click
I am not getting file uploaded path in code behind
Your UpdatePanel not formatted as it should be...http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel(v=vs.110).aspx[^]
you missing the ContentTemplate part...
ASP.NET
<asp:updatepanel id="udpSearch" runat="server" updatemode="Conditional">
  <contenttemplate>
    <table>
      <tr>
        <td>
          <asp:button id="btnSave" runat="server" />
        </td>
      </tr>
    </table>
  </contenttemplate>
  <triggers>
    <asp:postbacktrigger controlid="btnSave" />
  </triggers>
</asp:updatepanel>
 
Share this answer
 
v3
Comments
Keerthi Kumar(Andar) 21-Jul-14 1:46am    
xmlns:asp="#unknown" this property is not supporting in VS2008
Its giving below mentioned Error
Error 2 Type 'System.Web.UI.UpdatePanel' does not have a public property named 'xmlns:asp'.
Kornfeld Eliyahu Peter 21-Jul-14 1:49am    
That's a copy-paste error...See fixed sample...
Keerthi Kumar(Andar) 21-Jul-14 1:53am    
Im sorry sir. am already using <contenttemplate>
but while posting a code i forgot to add </contenttemplate>
Kornfeld Eliyahu Peter 21-Jul-14 2:16am    
In that case you missed something, as the code as it presented do partial post back and not full page post!!!
<asp:updatepanel id="udpSearch" runat="server" updatemode="Conditional">
  <contenttemplate>
    <table>
      <tr>
        <td>
          <asp:button id="btnSave" runat="server" />
        </td>
      </tr>
    </table>
  </contenttemplate>
  <triggers>
    <asp:postbacktrigger controlid="btnSave" />
  </triggers>
</asp:updatepanel>
 
Share this answer
 

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