I currently have an UpdatePanel application for using jQuery Dialog that contains a GridView.
And that the GridView contains the FileUpload control in the footer and the EmptyDataTemplate
To make FileUpload file management work in javascript, I know that we need a trigger.
However, the button that I want to designate as a trigger is inside the GridView template ...
when the btnAdd button is pressed, the file in the FileUpload control will be saved.
Here is the code:
<asp:UpdatePanel ID="upnlEditExpense" runat="server"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnAdd"/> </Triggers> ...................... ........................ ......................... <asp:GridView runat="server" ID="grdExpense" ShowHeader="True" ShowFooter="True" AutoGenerateColumns="False"> <Columns> ................... <asp:TemplateField> <FooterTemplate> <asp:LinkButton runat="server" ID="btnAdd" Text="Add" OnClick="btnAdd_Click"></asp:LinkButton> </FooterTemplate> </asp:TemplateField> </Columns> </asp:GridView> </asp:UpdatePanel>
If I put the button id directly in the trigger control id like this, an error occurs saying btnAdd cannot be found ...
What should I do to make FileUpload control work?
source share