harry code

harry code

  • NA
  • 124
  • 21.6k

FileUpload.HasFile always showing false

Aug 7 2018 4:43 AM
HI,
 
I am using FileUploader.BUt always getting False while checking with condition
 
if(FileUpload11HasFile).I am unable to solve this issue
 
Below is the sample code
 
<tr>
<td>
</td>
<td width="16%" >
Tender Due Date
</td>
<td width="34%" >
<asp:TextBox ID="txtTenderDueDt" runat="server" class="input" MaxLength="50" TabIndex="11"></asp:TextBox><span class="mandatoryfield">*</span>
<asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtTenderDueDt"
CssClass="cal_Theme1" Format="dd/MM/yyyy hh:mm" OnClientShowing="showDate" BehaviorID="txtTenderDueDt">
</asp:CalendarExtender>
</td>
<td valign="top">
EMD Attachment
</td>
<td width="34%" >
&nbsp;
<asp:FileUpload ID="FileUpload1" runat="server" Style="margin-left: 29px; width: 188px;"/>
<br />
<asp:Button ID="Button2" runat="server" TabIndex="20" Style="margin-top: 8px;"
Text="Upload" OnClick="btnTenderDocUpload_OnClick" />
</td>
<asp:Label ID="lblDateofRefund" runat="server" Visible="false" Text="Date of Refund"></asp:Label>
<td style="padding-left: 27px">
<asp:TextBox ID="txtrefundabledate" TabIndex="18" runat="server" Visible="false"
class="input"></asp:TextBox>
<asp:CalendarExtender ID="CalendarExtender8" runat="server" TargetControlID="txtrefundabledate"
CssClass="cal_Theme1" Format="dd/MM/yyyy " OnClientShowing="showDate" BehaviorID="txtrefundabledate">
</asp:CalendarExtender>
</td>
</tr>

Answers (9)