Problem using Demo.aspx page and trying upload with a custom page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem using Demo.aspx page and trying upload with a custom page

Guest-1055
Hello Dean. I'm using .Net Version 1.1 and I'm trying to use your NeatUpload. I have already copied
NeatUpload-1.3.18\dotnet\app\bin\Brettle.Web.NeatUpload.dll in my bin application directory
NeatUpload-1.3.18\NeatUpload-1.3.18\dotnet\app\NeatUpload dir under my root directory
NeatUpload-1.3.18\NeatUpload-1.3.18\dotnet\app\Brettle.Web.NeatUpload\Demo.aspx and
NeatUpload-1.3.18\NeatUpload-1.3.18\dotnet\app\Brettle.Web.NeatUpload\Demo.aspx.cs in a folder under my application.

In my web.config I added
<system.web>
        <httpRuntime maxRequestLength="2097151" executionTimeout="3600"/>
        <httpModules>
            <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload" />
        </httpModules>
</system.web>

Now the problem I face with which I Would like to have your help is:

I open the Demo.aspx page select three images to be uploaded and click the submit button.
The browser opens another page with progress bar that remains stuck.

Then I try to make a custom page in vb.Net which code is under this text.
The page is not showing any errors, the progress bar remains void while the file list above the "multiFileButton" is being deleted.
The Carica_Click Method is not executed and so no upload.

Thanks for any help you can give me and my colleagues.

Congratulations for your work

Best Regards

Badan Carlo


<%@ Page Language="VB" ContentType="text/html" trace="true"%>
<%@ Import Namespace="System.IO" %>
<%@ Register TagPrefix="Upload" Namespace="Brettle.Web.NeatUpload" Assembly="Brettle.Web.NeatUpload" %>


<script runat="server">
    Sub Carica_Click (sender As Object, e As System.EventArgs)
        If Page.IsValid
            if multiFile.Files.Length>0
                bodyPre.InnerText &= "Caricati " & multiFile.Files.Length & " files"
                For Each f As UploadedFile In multiFile.Files
                    Trace.Warn("test_click", Path.Combine(Request.PhysicalApplicationPath, f.FileName))
                    f.MoveTo(Path.Combine(Request.PhysicalApplicationPath,f.FileName), MoveToOptions.Overwrite)
                    bodyPre.InnerText &= f.FileName
                next
            end if
        End If
    End Sub
</script>



<form runat="server">
    <Upload:MultiFile id="multiFile" runat="server" useFlashIfAvailable="true" flashFilterExtensions="*.jpg;*.gif;*.png">
        <asp:Button id="multiFileButton" Text="Seleziona file da caricare" Enabled="<%# multiFile.Enabled %>" runat="server"/>
    </Upload:MultiFile>
    <Upload:ProgressBar id="progressBar" runat="server" inline="true" Triggers="submitButton linkButton commandButton htmlInputButtonButton htmlInputButtonSubmit" />
    <asp:Button id="submitButton" runat="server" Text="Carica" OnClick="Carica_Click" />
  
    <pre id="bodyPre" runat="server" />
</form>
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Demo.aspx page and trying upload with a custom page

Dean Brettle
Administrator
For Demo.aspx, do the files get uploaded even though the progress bar doesn't work or do the files not even get uploaded? The name of the uploaded files should be displayed below the submit button after the upload completes. Your other page looks ok, so the same problem is probably affecting both pages.

What version of IIS and browser are you running?

If you configure NeatUpload-1.3.18/dotnet/app/ as a separate app, does Brettle.Web.NeatUpload/Demo.aspx within it work correctly? If not, then can you upload files using a standard ASP.Net HtmlInputFile control?

--Dean