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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Uploading Files

Uploading Files

Scheduled Pinned Locked Moved ASP.NET
helptutorial
4 Posts 3 Posters 1 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.
  • R Offline
    R Offline
    Rahul Babu
    wrote on last edited by
    #1

    Iam uploading files using FileField control. It is working fine. Now I have Path of the up-loadable file in a variable. How to up-load it. The original syntax is: HttpPostedFile FileValue1 = Browse1.PostedFile; But now iam using : HttpPostedFile FileValue1 = strVal; //strVal is a string wer I have got the path of the file. But iam getting the error cannot convert string to HttpPostedFile wat can be the solution for this....... Thank You.

    K 1 Reply Last reply
    0
    • R Rahul Babu

      Iam uploading files using FileField control. It is working fine. Now I have Path of the up-loadable file in a variable. How to up-load it. The original syntax is: HttpPostedFile FileValue1 = Browse1.PostedFile; But now iam using : HttpPostedFile FileValue1 = strVal; //strVal is a string wer I have got the path of the file. But iam getting the error cannot convert string to HttpPostedFile wat can be the solution for this....... Thank You.

      K Offline
      K Offline
      koolprasad2003
      wrote on last edited by
      #2

      hello Rahul, if u have a virtual path then u can try upload with the server.mappath("address") just pass the value to the method and file will be uploaded to server, check following link, http://support.microsoft.com/kb/323245[^] regards, koolprasad2003:)

      If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy

      N 1 Reply Last reply
      0
      • K koolprasad2003

        hello Rahul, if u have a virtual path then u can try upload with the server.mappath("address") just pass the value to the method and file will be uploaded to server, check following link, http://support.microsoft.com/kb/323245[^] regards, koolprasad2003:)

        If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy

        N Offline
        N Offline
        NetRams
        wrote on last edited by
        #3

        Hi prasad, I am having the another doubt. As I know the destination server path, what I need is to pass the source path with out using browse button. How do I do that? Rams.

        Be simple and Be sample.

        K 1 Reply Last reply
        0
        • N NetRams

          Hi prasad, I am having the another doubt. As I know the destination server path, what I need is to pass the source path with out using browse button. How do I do that? Rams.

          Be simple and Be sample.

          K Offline
          K Offline
          koolprasad2003
          wrote on last edited by
          #4

          hello rams, just us the file upload control and get the physical pat and pass that path to server.mappath control, just follow link http://support.microsoft.com/kb/323245[^][^] regards, koolprasad2003:)

          If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy

          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