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. file uploading problem

file uploading problem

Scheduled Pinned Locked Moved ASP.NET
helptutorial
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.
  • M Offline
    M Offline
    Miss Maheshwari
    wrote on last edited by
    #1

    hello i have created a fileupload at runtime...now i want to set its file from code...but its showing error that its read only...

    FileUpload fl = new FileUpload();

               // fl.Attributes.Add("value", fullpath); also tried this
               fl.FileName="D://pic//bullet.gif";
                fl.SaveAs(pic\_path1);
    

    please someone help how to set the file name in fileupload at runtime... Thanks

    E J 2 Replies Last reply
    0
    • M Miss Maheshwari

      hello i have created a fileupload at runtime...now i want to set its file from code...but its showing error that its read only...

      FileUpload fl = new FileUpload();

                 // fl.Attributes.Add("value", fullpath); also tried this
                 fl.FileName="D://pic//bullet.gif";
                  fl.SaveAs(pic\_path1);
      

      please someone help how to set the file name in fileupload at runtime... Thanks

      E Offline
      E Offline
      Eduard Keilholz
      wrote on last edited by
      #2

      Yeah... this is obviously for security reasons... You cannot initiate a file upload from within the website. The user must select a file.

      .: I love it when a plan comes together :. http://www.zonderpunt.nl

      1 Reply Last reply
      0
      • M Miss Maheshwari

        hello i have created a fileupload at runtime...now i want to set its file from code...but its showing error that its read only...

        FileUpload fl = new FileUpload();

                   // fl.Attributes.Add("value", fullpath); also tried this
                   fl.FileName="D://pic//bullet.gif";
                    fl.SaveAs(pic\_path1);
        

        please someone help how to set the file name in fileupload at runtime... Thanks

        J Offline
        J Offline
        J a a n s
        wrote on last edited by
        #3

        Please read the documentation[^] first.

        *jayakrishnan

        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