forum

Home / DeveloperSection / Forums / Is there a way to check Fileupload has file or not in client side.If It has i want to enable button

Is there a way to check Fileupload has file or not in client side.If It has i want to enable button

Nattapong Unaregul792421-Jul-2012
Here is my code in default.aspx .The default.aspx is in the content place
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
   <tr> <td><asp:FileUpload ID="FileUpload1" runat="server" " /></td>
           <td> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Task cannot be blank"
        InitialValue="" ControlToValidate="FileUpload1"> </asp:RequiredFieldValidator></td></tr>
   <tr><td><asp:Button ID="SaveBT" runat="server" Text="Button" Enable = "False"  /></td></tr> 
  </table>    
  

</asp:Content>



Updated on 22-Jul-2012

Can you answer this question?


Answer

2 Answers

Liked By