Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. please help me

please help me

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zakareuya
    wrote on last edited by
    #1

    hi.. i want to let the cutomer of my site to upload files to my server .. how can i do it.. Zakareya Sawalha

    J L 2 Replies Last reply
    0
    • Z Zakareuya

      hi.. i want to let the cutomer of my site to upload files to my server .. how can i do it.. Zakareya Sawalha

      J Offline
      J Offline
      Juno EasyDotNet com
      wrote on last edited by
      #2

      Hi, Use the HtmlInputFile server control to handle uploading binary or text files from a browser client to the server. File upload works with Microsoft Internet Explorer version 3.02 or later. Note The Enctype property of an HtmlForm must be set to "multipart/form-data" for this control to work properly. Sub Button1_Click(Source As Object, e As EventArgs) If Text1.Value = "" Then Span1.InnerHtml = "Error: you must enter a file name" Return End If If Not (File1.PostedFile Is Nothing) Then Try File1.PostedFile.SaveAs(("c:\temp\" & Text1.Value)) Span1.InnerHtml = "File uploaded successfully to **c:\temp\" & _ Text1.Value & "** on the Web server" Catch exc As Exception Span1.InnerHtml = "Error saving file **c:\temp\" & _ Text1.Value & "** " & exc.ToString() End Try End If End Sub 'Button1_Click Juno MCSD.NET, MCDBA, MCSE ---------------------------------------------------------- Support Team of EasyDotNet, INC. http://www.EasyDotNet.com DataForm.NET - The most powerful data entry web server control for ASP.NET

      1 Reply Last reply
      0
      • Z Zakareuya

        hi.. i want to let the cutomer of my site to upload files to my server .. how can i do it.. Zakareya Sawalha

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Use the "File Field" HTML control. Use MyFile.PostedFile.SaveAs("FilePath") to save the file to local folder. MyFile is the control name and FilePath ic the full path of the file to be saved(including the file name).

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups