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. Upload image?

Upload image?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
6 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.
  • K Offline
    K Offline
    Kasi Viswanathan
    wrote on last edited by
    #1

    How to Upload Image in asp.net 2.0?

    M V 2 Replies Last reply
    0
    • K Kasi Viswanathan

      How to Upload Image in asp.net 2.0?

      M Offline
      M Offline
      monu nair
      wrote on last edited by
      #2

      Use File control of asp.net mbmb

      K 1 Reply Last reply
      0
      • K Kasi Viswanathan

        How to Upload Image in asp.net 2.0?

        V Offline
        V Offline
        VenkataRamana Gali
        wrote on last edited by
        #3

        protected void UploadBtn_Click(object sender, EventArgs e) { if (FileUpLoad1.HasFile) { FileUpLoad1.SaveAs(@"C:\temp\" + FileUpLoad1.FileName); Label1.Text = "File Uploaded: " + FileUpLoad1.FileName ; } else Label1.Text = "No File Uploaded."; }

        Ramana

        K 1 Reply Last reply
        0
        • M monu nair

          Use File control of asp.net mbmb

          K Offline
          K Offline
          Kasi Viswanathan
          wrote on last edited by
          #4

          I want to Upload Image from hard drive and save in Image folder in my project.... I am using File Upload control....Send me code for button click event

          1 Reply Last reply
          0
          • V VenkataRamana Gali

            protected void UploadBtn_Click(object sender, EventArgs e) { if (FileUpLoad1.HasFile) { FileUpLoad1.SaveAs(@"C:\temp\" + FileUpLoad1.FileName); Label1.Text = "File Uploaded: " + FileUpLoad1.FileName ; } else Label1.Text = "No File Uploaded."; }

            Ramana

            K Offline
            K Offline
            Kasi Viswanathan
            wrote on last edited by
            #5

            I want to Save Uploaded Image in my project... But when i use ur code the image was not in the target location(C:\temp)...

            V 1 Reply Last reply
            0
            • K Kasi Viswanathan

              I want to Save Uploaded Image in my project... But when i use ur code the image was not in the target location(C:\temp)...

              V Offline
              V Offline
              VenkataRamana Gali
              wrote on last edited by
              #6

              use Server.MapPath(""); instead of c:\temp if u are storing in sepearate folder, u have to set folder write Permissions, right click goto security tab...

              Ramana

              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