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. Clearing a data binded image

Clearing a data binded image

Scheduled Pinned Locked Moved C#
databasecsharpsql-servervisual-studiowpf
1 Posts 1 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.
  • C Offline
    C Offline
    Chals
    wrote on last edited by
    #1

    Hi! I have a user control with a PictureBox control. This picturebox's image is data binded to a binary field in the database. When I set the image, it works fine: image is saved in the DB and everythings fine. Now, when I want to CLEAR the image, I do the following: this.picImage.Image.Dispose(); this.picImage.Image = null; and...nothing happens. The next time I open the form, the image is still there. The binding is correct because if I change the bitmap, it is saved properly. It seems to be ignoring the null value Im trying to persist in the database. I'm using Visual Studio 2005 and SQL Server 2005. Help! Thanks in advance :)

    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