473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem with Download and upload feature while in update panel.

Hi,

I have an update panel with a dropdown list. On index change, values will be populated from databas. The dropdownlist and the table are placed in an update panel. Now, i have added another table with download and upload features. if i try to put these button in the update panel an error is raised saying:
" Response method has been modified or Server trace is enabled.
My requiremet needs the download feature to be visible only the selected index change. How do I avoid the error?'


Thanks
Jul 7 '08 #1
2 1223
Frinavale
9,735 Expert Mod 8TB
I'm not sure what you are trying to do...
You have a DropDownList and then when a user selects an item you Repopulate the DropDownList with something else?

Could you please post your code so that I can better understand what you're doing?
Jul 7 '08 #2
Here I have a DropDownList ddlHoldingComp and a gridview gvTraining
On DropDownList SelectedIndexchange, the grid view will be updated and the upload download buttons will be visible.
Now if i put the upload download buttons in UpdatePanel, and try to download a file the Aspx page throws an error saying
"The Response has been changed or server trace has been enabled".

Following is my code.


Expand|Select|Wrap|Line Numbers
  1.   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  2.           <contenttemplate>
  3.                 <table>
  4.                 <tr>
  5.                     <td>
  6.                        <asp:UpdatePanel ID="UpdatePanel9" runat="server">
  7.                           <contenttemplate>
  8.                                 <table id="tblLookup" cellspacing="0" cellpadding="5" width="100%" border="0" runat="server">                  
  9.                                     <tr>                      
  10.                                         <td align="left" width="73%">
  11.                                             <asp:DropDownList ID="ddlHoldingComp" runat="server" AutoPostBack="true" 
  12.                                                 Width="45%" OnSelectedIndexChanged="ddlHoldingComp_SelectedIndexChanged">
  13.                                             </asp:DropDownList>
  14.                                         </td>
  15.                                     </tr>
  16.  
  17.                                 </table>
  18.                             </contenttemplate>
  19.                       </asp:UpdatePanel>
  20.                     </td>
  21.                 </tr>
  22.                 <tr>
  23.                     <td>
  24.                        <asp:UpdatePanel ID="UpdatePanel7" runat="server">
  25.                           <contenttemplate>   
  26.  
  27.                             <table width="100%" border="0" cellpadding="0" cellspacing="5" visible="false">
  28.                                 <tr align="left" valign="top">
  29.                                     <td>
  30.                                         <asp:GridView ID="gvTraining" BorderColor="DarkGray" runat="server" Width="98%" CellPadding="5"
  31.                                             HeaderStyle-CssClass="table-head3" AlternatingRowStyle-BackColor="#e1e1e1" HorizontalAlign="Left"
  32.                                             AutoGenerateColumns="False" >
  33.                                             <Columns>
  34.                                                 <asp:TemplateField HeaderText="Select">
  35.                                                     <ItemTemplate>
  36.                                                         <asp:RadioButton ID="rbtnSelect" runat="server" onClick="ShowHideControls(this)"></asp:RadioButton>
  37.                                                     </ItemTemplate>
  38.                                                     <HeaderStyle HorizontalAlign="center" BorderColor="DarkGray" />
  39.                                                     <ItemStyle BorderColor="DarkGray" HorizontalAlign="Center" VerticalAlign="top">
  40.                                                     </ItemStyle>
  41.                                                 </asp:TemplateField>
  42.                                                 <asp:BoundField DataField="Description" HeaderText="Trainings" HeaderStyle-HorizontalAlign="Center"
  43.                                                     HtmlEncode="false">
  44.                                                     <ItemStyle CssClass="fieldstext" BorderColor="DarkGray" HorizontalAlign="left" Width="90%">
  45.                                                     </ItemStyle>
  46.                                                 </asp:BoundField>
  47.                                             </Columns>
  48.                                             <HeaderStyle CssClass="table-head3" BorderColor="DarkGray"></HeaderStyle>
  49.                                             <AlternatingRowStyle BackColor="#E1E1E1"></AlternatingRowStyle>
  50.                                         </asp:GridView>
  51.                                     </td>
  52.                                 </tr>
  53.                             </table>
  54.  
  55.                           </contenttemplate>
  56.                        </asp:UpdatePanel>  
  57.                     </td>
  58.                  </tr>
  59.                 <tr>
  60.                     <td>
  61.                         <asp:UpdatePanel ID="UpdatePanel2" runat="server">
  62.                             <contenttemplate>
  63.                                 <table border="0" width="90%" cellpadding="5" cellspacing="0" style="border-color: Gray;" id="tblUpload" runat="server" visible=false>
  64.                                         <tr valign="middle">                                               
  65.                                             <td width="31%" align="left" valign="top">
  66.  
  67.                                                 <asp:LinkButton runat="server" SkinID="lbtnSkin" ID="ibtnDownload" Text="Text"
  68.                                                     OnClick="ibtnDownload_Click"></asp:LinkButton>
  69.  
  70.                                             </td>
  71.                                         </tr>
  72.  
  73.                                         <tr>
  74.                                             <td colspan="2" valign="top">
  75.                                                 <asp:FileUpload ID="fileUpload" runat="server" Width="98%"></asp:FileUpload>
  76.                                             </td>
  77.                                             <td align="left">
  78.  
  79.                                                 <asp:ImageButton ID="ibtnUpload" runat="server" BorderWidth="0" ImageUrl="~/Images/upload-but.gif"
  80.                                                     OnClick="ibtnUpload_Click" OnClientClick="ValidateUpload()"></asp:ImageButton>                                                
  81.                                             </td>
  82.                                         </tr>
  83.                                  </table> 
  84.                             </contenttemplate>
  85.                         </asp:UpdatePanel>
  86.                     </td>
  87.  
  88.                  </tr>
  89.                  </table>
  90.           </contenttemplate>
  91.        </asp:UpdatePanel>
Jul 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Gary O'Malley | last post by:
Everytime I download a file from the web I get a nice animated dialogue box that shows the size of the file, how much has been received and the approximate remaining time. It also gives the...
0
by: Benjamin Bittner | last post by:
Hallo NG, ive searched a lot in some google groups, and found many threads, but nothing that helped me. Here is the scenario: I have an aspx page which loads a user control in page.onInit like...
4
by: Lloyd Dupont | last post by:
The code snippets are below. I write in (C#) a Page object in a control library. I'm using this page as an HtppHandler in a website (which referes the DLL). This page contains 2 panels (one is...
1
by: theburnetts | last post by:
I am building an ASP.NET application that has a requirement that the user should be able to download all of the data that they have input into the system and save it to a file on their local PC. ...
1
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
1
by: M.V. | last post by:
I'm trying to implement a progress indicator using atlas. Note that this indicator does not have to reflect the real progress but just to let the user know that the something is being done so that...
2
by: torbjorn.maro | last post by:
I'm the developer of an enterprise level web application that among other things handles documents. The documents are stored in a database. There is now simple functionality to check out and...
3
by: shapper | last post by:
Hello, I need to upload a file. Can I only do this with the File Upload control? I also need the following: - Send upload info, upload percentage, continuously to a JavaScript function so...
1
by: hetalupadhyay | last post by:
hi i take one file upload control put in update panel when i click save button then file upload control not read taken file if remove update panel then work pls give me answer fro...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.