Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
56
WebDialogWindow with Update Panel and File Upload
posted

Hi,

I would appreciate it a lot if someone could please help me with this.  I have an updatepanel which has a button, which when clicked shows the web dialog window, within the dialog window I have a file upload and a button upload.  Apparently ajax does not like the upload control.  HasFile is always returning false. What way can I work around this?  I have tried using the <Triggers><asp:PostBackTrigger ControlID="" /></Triggers> of the update panel but get an error that it can't find the control. 

Can anyone please help?

>_< if only i knew how to make this code look more readable

 <asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

 

 

</asp:ScriptManager>

 

 

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

 

 

<asp:PostBackTrigge<asp:ScriptManager ID="ScriptMaID="UpdatePanel1"

 

<ContentTemplate> 

 

<

 

 

asp:Button ID="btnVendorAdd" runat="server" Text="Add" onclick="btnVendorAdd_Click"/>

<%

 

--Dialog control for attaching the document--%>

 

 

<ig:WebDialogWindow ID="dlgAttachment" runat="server" Height="200px" Width="400px" Modal="True" InitialLocation="Centered" WindowState="Hidden" Font-Names="Calibri" Font-Size="Small" ForeColor="DimGray">

 

<

 

 

Header CaptionAlignment="Left" CaptionText="Browse for slip...">

<MaximizeBox AltText="Maximize"></MaximizeBox>

<MinimizeBox AltText="Minimize"></MinimizeBox>

<CloseBox Visible="false" />

</Header>

<ContentPane>

<Template>

<asp:Panel ID="pnlFileUpPrompt" runat="server" Visible="true" Width="100%">

<asp:FileUpload ID="fUp" runat="server" />

<asp:Button ID="btnUpload" runat="server" Text="Attach"onclick="btnUpload_Click"/>

 

</

 

 

asp:Panel>

</Template>

 

 

 

 

</ContentPane>

 

 

 

 

</ig:WebDialogWindow>

</ContentTemplate>

 

 

</

 

 

asp:UpdatePanel>

 

 

<

 

 

asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false" AssociatedUpdatePanelID="UpdatePanel1"></asp:UpdateProgress>

 

</

 

 

asp:Content>

protected void btnVendorAdd_Click(object sender, EventArgs e)

{

dlgAttachment.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal;

}

 

protected

 

 

void btnUpload_Click(object sender, EventArgs e)

{

this is always returning false.

 

 

if

 

 

(fUp.HasFile)

 

 

 

}