title: Postback triggers problem
body: <p>I have a gridview in which I display file names getting from Database. I have made the file name as a link button in my gridview.</p>
  
  <pre><code>&lt;asp:GridView ID="gdvMainList" runat="server" CssClass="Grid" 
  AutoGenerateColumns="False" DataSourceID="dtsFilesUploaded" 
  AllowPaging="True" DataKeyNames="Id" SkinID="PagedGridView" AllowSorting="True" 
  onrowediting="gdvMainList_RowEditing" OnRowDataBound="gdvMainList_RowDataBound"                                                     onrowupdating="gdvMainList_RowUpdating" onrowcommand="gdvMainList_RowCommand"&gt;                                                    
  &lt;Columns&gt;
  
  &lt;asp:TemplateField HeaderText="File Name" SortExpression="FileName"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:LinkButton ID="lbFileName" runat="server" Text='&lt;%# Bind("FileName") %&gt;' OnClick="OpenFile" CausesValidation="false"&gt;&lt;/asp:LinkButton&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  
  &lt;asp:TemplateField HeaderText="Uploaded On" SortExpression="CreatedDateTime"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:Label ID="lblCreatedDate" runat="server" Text='&lt;%# Bind("CreatedDateTime") %&gt;'&gt;&lt;/asp:Label&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  &lt;asp:TemplateField HeaderText="Category" SortExpression="glCategoryId"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:Label ID="lblglCategoryId" runat="server" Text='&lt;%# Bind("GeneralLookup.LookupItem") %&gt;'&gt;&lt;/asp:Label&gt;
  &lt;/ItemTemplate&gt;
  &lt;EditItemTemplate&gt;
  &lt;asp:DropDownList ID="ddlglCategoryId" runat="server" CssClass="textEntry2" DataSourceID="dtsglCategoryId"                                                            DataTextField="LookupItem" DataValueField="Id" AppendDataBoundItems="true" Width="120px"&gt;
  &lt;/asp:DropDownList&gt;
  &lt;/EditItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  &lt;asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /&gt;
  &lt;asp:BoundField DataField="CreatedBy" HeaderText="Created By" Visible="false" /&gt;
  &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>The link button has a method Onclick="OpenFile" and the code of Open file is:</p>
  
  <pre><code>protected void OpenFile(object sender, EventArgs e)
      {
          LinkButton btn = (LinkButton)sender;
          string fileName = btn.Attributes["FileName"].ToString();
  
          //string path = Server.MapPath(".") + "\\Files\\" + fileName;
          string path = Server.MapPath("~") + "Upload\\" + this.fileUpload.FileName;
          if (File.Exists(path))
          {
              Response.AppendHeader("content-disposition", "filename=" + fileName);
              string type = "Application/word";
              if (type != "")
                  Response.ContentType = type;
              Response.WriteFile(path);
              Response.End();
          }
          else
          {
          }   
      }
  </code></pre>
  
  <p>Now the problem is, this code does not work in update panel and works very fine without update panel. That's why I am trying to add these lines to make a post back.</p>
  
  <pre><code>&lt;Triggers&gt;
       &lt;asp:PostBackTrigger ControlID="btnFileUploadSave" /&gt;
       &lt;asp:PostBackTrigger ControlID="lbFileName" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Control Id btnFileUploadSave is another image button in my file that is being used to upload file. Because upload file was also not possible in update panel without this.</p>
  
  <p>Anyway when I run this code, the following exception occurs:</p>
  
  <pre><code>Server Error in '/' Application.
  </code></pre>
  
  <p>A control with ID 'lbFileName' could not be found for the trigger in UpdatePanel 'upAttachFile'.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.</p>
  
  <p>Exception Details: System.InvalidOperationException: A control with ID 'btnOpenFile' could not be found for the trigger in UpdatePanel 'upAttachFile'.</p>
  
  <p>Please help if anyone can. I have wasted a lotttttttttttttt of my time on this.</p>
  
  <p>Here is the GUI of my aspx page:</p>
  
  <p><img src="https://i.stack.imgur.com/jmhPU.jpg" alt="enter image description here"></p>