using HTML button and using ASP.NET button

Feb 22, 2010 at 2:19 AM

i noticed in one of your examples you used the html button to invoke the flajaxian file uploader as shown below. what i want is to use an asp.net button but when i change the button from HTML to ASP.net the startfileupload script function cannot run and the files are not being uploaded. i use the serverside to upload my files. when i use the HTML button the serverside sub runs but when switching to asp.net button the sub is not invoked. is there anyway to use the .startUpload() with asp.net button?

<script>
function StartFileUpload(){
  // the FU1 is the server side control ID
  <%=FU1.ClientID%>.startUpload();
}
        </script>

        <fjx:FileUploader ID="FU1" runat="server" UploadButtonX="-300">

        </fjx:FileUploader>

        <input id="Button1" type="button" value="Upload" onclick="StartFileUpload()" />


 Protected Sub FU1_FileReceived(ByVal sender As Object, ByVal e As com.flajaxian.FileReceivedEventArgs) Handles FU1.FileReceived
        MsgBox("eter")
        e.File.SaveAs(Server.MapPath("~/Folder1/Folder2/Folder3/" & e.File.FileName))
    End Sub