Upload File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam

    Upload File

    Hi all,

    We have an old web application written in java and we want to convert this
    application to .net. this app stores straight html content forms in our
    database. These forms then get loaded based on each customer id in the
    request.

    The problem I'm facing right now is that, when a form has an "user upload"
    file option, I don't find a way in .Net to save the "user upload" file on
    our server from these html form without rebuilding data and the application
    entirely. This is because these form were saved in straight html tags (such
    as <input name="myfile" type="file" value="" />. ) Does anyone have any
    ideas how to get around this with .Net?

    Regards,

    Sam


  • Lars

    #2
    Re: Upload File

    Hi

    I'm a newbie to .Net but the other day I found out some thing intresting.
    The DataList was able to solve my problem with showing HTML code stored in
    my database in a matter to make sence for the user.

    Couldn't you just store the HTML uploaded files to your database.
    There should be a way to read what's posted back to the page by the Request
    function. I think I saw that in an instruction video.

    I just tested to add a form to a .Net page and failed to run the page since
    a page can only have one form.

    WHy not use thordinary old html file and post it to a ASP page.

    <html>
    <body>
    <!-- HTML Code -->
    <form action="myScrip t.aspx">
    <input name="myfile" type="file" value="" />
    <input type="submit" value="submit" text ="Submit" />
    </form>
    <!-- HTML Code -->
    </body>
    </html>

    Then take care of storing adding the file to a database in the ASP file. I
    racall that you can use the similar to $_POST in PHP scripts in ASP.NET when
    the page loads. But you might have to check in LoadPage if it's a post back
    or not.


    Lars


    "Sam" <askhuy@yahoo.c omskrev i meddelandet
    news:%23l%23VJs YbIHA.2268@TK2M SFTNGP02.phx.gb l...
    Hi all,
    >
    We have an old web application written in java and we want to convert this
    application to .net. this app stores straight html content forms in our
    database. These forms then get loaded based on each customer id in the
    request.
    >
    The problem I'm facing right now is that, when a form has an "user upload"
    file option, I don't find a way in .Net to save the "user upload" file on
    our server from these html form without rebuilding data and the
    application entirely. This is because these form were saved in straight
    html tags (such as <input name="myfile" type="file" value="" />. ) Does
    anyone have any ideas how to get around this with .Net?
    >
    Regards,
    >
    Sam
    >
    >

    Comment

    Working...