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. adding image in side a project folder

adding image in side a project folder

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 4 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.
  • R Offline
    R Offline
    ritasaumya
    wrote on last edited by
    #1

    if we want to send a image in a folder which is in my project on clicking a button after selecting a image from any directory in my computer through fileupload web control?

    C A S 3 Replies Last reply
    0
    • R ritasaumya

      if we want to send a image in a folder which is in my project on clicking a button after selecting a image from any directory in my computer through fileupload web control?

      C Offline
      C Offline
      Coding C
      wrote on last edited by
      #2

      Save it in that folder using FileUpload control method. Google on FileUpload control usage.

      Coding C# ExciteTemplate

      1 Reply Last reply
      0
      • R ritasaumya

        if we want to send a image in a folder which is in my project on clicking a button after selecting a image from any directory in my computer through fileupload web control?

        A Offline
        A Offline
        Arun Jacob
        wrote on last edited by
        #3

        Try to search in Google or MSDN you'll get tons of samples for FileUpload control. :)

        Arun Jacob http://codepronet.blogspot.com/

        1 Reply Last reply
        0
        • R ritasaumya

          if we want to send a image in a folder which is in my project on clicking a button after selecting a image from any directory in my computer through fileupload web control?

          S Offline
          S Offline
          sashidhar
          wrote on last edited by
          #4

          Try This Code

          FileUpload1.SaveAs(Server.MapPath("images1") + "/" +TextBox2 .Text +TextBox4 .Text + FileUpload1.FileName);
          FileUpload2.SaveAs(Server.MapPath("images1") + "/" + TextBox2.Text + TextBox4.Text + FileUpload2.FileName);
          FileUpload3.SaveAs(Server.MapPath("images1") + "/" + TextBox2.Text + TextBox4.Text + FileUpload3.FileName);
          cmd.Parameters.AddWithValue("@hotelexteriorview","./images1/" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName) );
          cmd.Parameters.AddWithValue("@roomtype1","./images1/" + System.IO.Path.GetFileName(FileUpload2.PostedFile.FileName) );
          cmd.Parameters.AddWithValue("@roomtype2", "./images1/" + System.IO.Path.GetFileName(FileUpload3.PostedFile.FileName));

          FileUpload1.SaveAs save the file in server.mappath cmd.Parameters.AddWithValue save the link in database I Used this code long back hope it may help

          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