c# - Can I have a FileUpload control inside the Complete step of a Wizard that is surrounded by an UpdatePanel? -
i have wizard control surrounded updatepanel , want fileupload control within complete step. aware fileupload control work inside updatepanel if trigger added updatepanel, but, updatepanel cannot find button1 control in example below. believe "feature" of complete step. there way (preferably simple one) inside of complete step?
<asp:updatepanel id="updatepanel1" runat="server"> <triggers> <asp:postbacktrigger controlid="button1" /> </triggers> <contenttemplate> <asp:wizard id="wizard1" runat="server"> <wizardsteps> <asp:wizardstep id="wizardstep1" runat="server" title="step 1"> </asp:wizardstep> <asp:wizardstep id="wizardstep2" runat="server" title="step 2" steptype="complete"> <asp:fileupload id="fileupload1" runat="server" /> <asp:button id="button1" runat="server" text="button" /> </asp:wizardstep> </wizardsteps> </asp:wizard> </contenttemplate> </asp:updatepanel>
ok, after browsing internet hours have found solution. needed nested updatepanel within wizard complete step postbacktrigger on button1 , matching postbacktrigger on outer updatepanel.
like following:
<asp:updatepanel id="updatepanel1" runat="server"> <triggers> <asp:postbacktrigger controlid="button1" /> </triggers> <contenttemplate> <asp:wizard id="wizard1" runat="server"> <wizardsteps> <asp:wizardstep id="wizardstep1" runat="server" title="step 1"> </asp:wizardstep> <asp:wizardstep id="wizardstep2" runat="server" title="step 2" steptype="complete"> <asp:updatepanel id="updatepanel2" runat="server"> <triggers> <asp:postbacktrigger controlid="button1" /> </triggers> <contenttemplate> <asp:fileupload id="fileupload1" runat="server" /> <asp:button id="button1" runat="server" text="button" /> <contenttemplate/> <updatepanel/> </asp:wizardstep> </wizardsteps> </asp:wizard> </contenttemplate> </asp:updatepanel>
also, may find first time upload file control not have file. don't know reason may need enctype="multipart/form-data" on form tag.
i hope finds helpful in future.
Comments
Post a Comment