Posted on: 12/5/2013 7:04:04 PM | Views : 709

I have an <asp:FileUpload id="FileUpload" > control (see code below). When I select a file, the TextBox portion of the control is populated with the selected file name but when I select 'Upload' button and step through the Click event's code, the 'FileUploadControl.HasFile' is always false. Any advice?
HTML ---- <div> <asp:FileUpload ID="FileUploadControl" runat="server" CssClass="row3" Width="100%" /> <asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> <asp:Label runat="server" id="StatusLabel" text="Upload status: " /> </div> CODE BEHIND ----------- protected void UploadButton_Click(object sender, EventArgs e) { if (FileUploadControl.HasFile) <------ Always False { try { if ...

Go to the complete details ...