Problem with Download and upload feature while in update panel.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pratsadhu
    New Member
    • Mar 2007
    • 16

    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
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    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?

    Comment

    • pratsadhu
      New Member
      • Mar 2007
      • 16

      #3
      Here I have a DropDownList ddlHoldingComp and a gridview gvTraining
      On DropDownList SelectedIndexch ange, 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.


      [code=asp]
      <asp:UpdatePane l ID="UpdatePanel 1" runat="server">
      <contenttemplat e>
      <table>
      <tr>
      <td>
      <asp:UpdatePane l ID="UpdatePanel 9" runat="server">
      <contenttemplat e>
      <table id="tblLookup" cellspacing="0" cellpadding="5" width="100%" border="0" runat="server">
      <tr>
      <td align="left" width="73%">
      <asp:DropDownLi st ID="ddlHoldingC omp" runat="server" AutoPostBack="t rue"
      Width="45%" OnSelectedIndex Changed="ddlHol dingComp_Select edIndexChanged" >
      </asp:DropDownLis t>
      </td>
      </tr>

      </table>
      </contenttemplate >
      </asp:UpdatePanel >
      </td>
      </tr>
      <tr>
      <td>
      <asp:UpdatePane l ID="UpdatePanel 7" runat="server">
      <contenttemplat e>

      <table width="100%" border="0" cellpadding="0" cellspacing="5" visible="false" >
      <tr align="left" valign="top">
      <td>
      <asp:GridView ID="gvTraining " BorderColor="Da rkGray" runat="server" Width="98%" CellPadding="5"
      HeaderStyle-CssClass="table-head3" AlternatingRowS tyle-BackColor="#e1e 1e1" HorizontalAlign ="Left"
      AutoGenerateCol umns="False" >
      <Columns>
      <asp:TemplateFi eld HeaderText="Sel ect">
      <ItemTemplate >
      <asp:RadioButto n ID="rbtnSelect " runat="server" onClick="ShowHi deControls(this )"></asp:RadioButton >
      </ItemTemplate>
      <HeaderStyle HorizontalAlign ="center" BorderColor="Da rkGray" />
      <ItemStyle BorderColor="Da rkGray" HorizontalAlign ="Center" VerticalAlign=" top">
      </ItemStyle>
      </asp:TemplateFie ld>
      <asp:BoundFie ld DataField="Desc ription" HeaderText="Tra inings" HeaderStyle-HorizontalAlign ="Center"
      HtmlEncode="fal se">
      <ItemStyle CssClass="field stext" BorderColor="Da rkGray" HorizontalAlign ="left" Width="90%">
      </ItemStyle>
      </asp:BoundField>
      </Columns>
      <HeaderStyle CssClass="table-head3" BorderColor="Da rkGray"></HeaderStyle>
      <AlternatingRow Style BackColor="#E1E 1E1"></AlternatingRowS tyle>
      </asp:GridView>
      </td>
      </tr>
      </table>

      </contenttemplate >
      </asp:UpdatePanel >
      </td>
      </tr>
      <tr>
      <td>
      <asp:UpdatePane l ID="UpdatePanel 2" runat="server">
      <contenttemplat e>
      <table border="0" width="90%" cellpadding="5" cellspacing="0" style="border-color: Gray;" id="tblUpload" runat="server" visible=false>
      <tr valign="middle" >
      <td width="31%" align="left" valign="top">

      <asp:LinkButt on runat="server" SkinID="lbtnSki n" ID="ibtnDownloa d" Text="Text"
      OnClick="ibtnDo wnload_Click"></asp:LinkButton>

      </td>
      </tr>

      <tr>
      <td colspan="2" valign="top">
      <asp:FileUplo ad ID="fileUpload " runat="server" Width="98%"></asp:FileUpload>
      </td>
      <td align="left">

      <asp:ImageButto n ID="ibtnUpload " runat="server" BorderWidth="0" ImageUrl="~/Images/upload-but.gif"
      OnClick="ibtnUp load_Click" OnClientClick=" ValidateUpload( )"></asp:ImageButton >
      </td>
      </tr>
      </table>
      </contenttemplate >
      </asp:UpdatePanel >
      </td>

      </tr>
      </table>
      </contenttemplate >
      </asp:UpdatePanel >[/code]

      Comment

      Working...