You must Sign In to post a response.
  • Category: ASP.NET

    How to get selected filename using fileuploade control in Ajax Accordion control and update Panel?

    Hi

    I placed file upload control inside the Ajax accordion control and Ajax accordion in update panel...
    I selected file from File upload control but i can not get file name it shows as empty...how can i get selected file from fileupload control?.
  • #766234
    Hi,

    Once Page refreshes the control (file upload) loose his session, so I suggest you to check whether page refreshed or not?

    Perform your task before refresh the page, to avoid this problem...

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #766236
    Hi

    yes whether your page posted using file upload control submit loose the data.

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766237
    Hi
    try this code

    Client Side


    <asp:UpdatePanel ID="Acc_UpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>

    <My Accordion Panes>

    <asp:UpdatePanel ID="FileUpPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    necessary lines....
    </ContentTemplate>
    <Triggers>
    <asp:PostBackTrigger ControlID="btnUpload" />
    </Triggers>
    </asp:UpdatePanel>


    </ContentTemplate>
    </asp:UpdatePanel>



    Server Side



    if (FileUpload1.HasFile)
    {
    // Necessary codes
    }

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #766239
    try this code
    To upload the file synchronously using PostBackTrigger with full post back.
    use
    <code><pre>
    <Triggers
    <asp:PostBackTrigger ControlID = "btnUpload"
    </Triggers
    <pre>
    </code>


Sign In to post your comments