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. General Programming
  3. C#
  4. Picture box

Picture box

Scheduled Pinned Locked Moved C#
designregexhelp
7 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.
  • B Offline
    B Offline
    B87
    wrote on last edited by
    #1

    Hi, Iam creating picture box dynamically but iam getting this error, CODE: PictureBox pb = new PictureBox(); Form.Controls.Add(pb); //Error is in this line// The error comment is: The best overloaded method match for 'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments.

    G 1 Reply Last reply
    0
    • B B87

      Hi, Iam creating picture box dynamically but iam getting this error, CODE: PictureBox pb = new PictureBox(); Form.Controls.Add(pb); //Error is in this line// The error comment is: The best overloaded method match for 'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      You can't put windows controls in a web page.

      Despite everything, the person most likely to be fooling you next is yourself.

      B 1 Reply Last reply
      0
      • G Guffa

        You can't put windows controls in a web page.

        Despite everything, the person most likely to be fooling you next is yourself.

        B Offline
        B Offline
        B87
        wrote on last edited by
        #3

        Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?

        G J V 3 Replies Last reply
        0
        • B B87

          Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          No, that is not possible. The browser requests the image separately from the page, so it needs an url to request it from.

          Despite everything, the person most likely to be fooling you next is yourself.

          1 Reply Last reply
          0
          • B B87

            Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?

            J Offline
            J Offline
            J4amieC
            wrote on last edited by
            #5

            You need to set up a proxy page, which reads the image data from the database and writes it to the output stream. Then you set the ImageUrl to the url of your proxy page.

            1 Reply Last reply
            0
            • B B87

              Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?

              V Offline
              V Offline
              V 0
              wrote on last edited by
              #6

              there are several options - if you can take out the files from the database, you can set them in a directory and save the paths instead. - if that's not an option, stream the file to a tmp directory and set the url to that path, when the session expires you delete the files used within that session (you'll need a good naming convention...) hope this helps.

              V.
              Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

              J 1 Reply Last reply
              0
              • V V 0

                there are several options - if you can take out the files from the database, you can set them in a directory and save the paths instead. - if that's not an option, stream the file to a tmp directory and set the url to that path, when the session expires you delete the files used within that session (you'll need a good naming convention...) hope this helps.

                V.
                Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

                J Offline
                J Offline
                J4amieC
                wrote on last edited by
                #7

                You forgot the solution that doesnt require writing the data to disk, which the OP has now been given >3 times.

                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