0 Replies - 923 Views - Last Post: 30 July 2019 - 08:03 AM Rate Topic: -----

#1 DarenR   User is offline

  • D.I.C Lover

Reputation: 634
  • View blog
  • Posts: 4,218
  • Joined: 12-January 10

file upload isnt working in the updatepanel

Posted 30 July 2019 - 08:03 AM

hey all,

i have an upload control inside an update panel
the issue is that it returns null when uploading

  Dim _testName as String = fileUploadCompareExcel.PostedFile.FileName

  <div class="div1">
                                        <div class="div3">
                                            <asp:FileUpload ID="fileUploadCompareExcel"   runat="server"/>
                                        <div class="div2">
                                            <asp:Button runat="server" ID="btnUploadCompare" text="Upload Compare" CssClass="btnStyle1" onclick="ImportCompareFile" OnClientClick="ShowProgress();"/>
                                            <asp:Button id="btnBack" runat="server" text="Go Back" CssClass="btnStyle1" OnClientClick="return Confirm();" onclick="SourceVisible"/>

update panel that code resides in

 <div><asp:UpdatePanel runat="server" id="upDating">

                            <div class="divContainerMain">
                <asp:PostBackTrigger ControlID="btnUploadCompare" />

i also put this in page load for testing:

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

no matter what it always returns null in the testName

Is This A Good Question/Topic? 0
  • +

Page 1 of 1