ASP.NET 2.0 ImageField Upload Image Insert / Update

Discussion in 'ASP .Net' started by JpMaxMan, Mar 14, 2006.

  1. JpMaxMan

    JpMaxMan Guest

    Greetings - I have found very little definitive information on this.
    From what I can surmize at some point the ability to update an image in
    the gridview using the imagefield was removed from the final version of
    asp.net 2.0?

    If this is the case, does anyone have any work arounds for how to use a
    edit template to allow a user to browse and upload a replacement image
    when editing a row?

    If this is not the case, what is the trick to get more than just a text
    field with the image path stored in the db when editing the row?
    JpMaxMan, Mar 14, 2006
    #1
    1. Advertising

  2. JpMaxMan

    JpMaxMan Guest

    To clarify - a bit, The problem is with using the standard update /
    insert commands giving the user the ability to upload a new image, have
    that image stored in a designated directory and publish the name of the
    image back to the database. Not with displaying the image in the grid -
    that is pretty straight forward. But once I display it, the user needs
    to be able to update or insert a new image via an HTTP file upload control.


    JpMaxMan wrote:
    > Greetings - I have found very little definitive information on this.
    > From what I can surmize at some point the ability to update an image in
    > the gridview using the imagefield was removed from the final version of
    > asp.net 2.0?
    >
    > If this is the case, does anyone have any work arounds for how to use a
    > edit template to allow a user to browse and upload a replacement image
    > when editing a row?
    >
    > If this is not the case, what is the trick to get more than just a text
    > field with the image path stored in the db when editing the row?
    JpMaxMan, Mar 14, 2006
    #2
    1. Advertising

  3. Why don't you try putting an HTMLInputFile (input type="file") control in a
    column next to each image? Then you can use a combination of ItemDatabound to
    correctly populate and the postBack to capture an uploaded image.

    Peter
    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "JpMaxMan" wrote:

    > To clarify - a bit, The problem is with using the standard update /
    > insert commands giving the user the ability to upload a new image, have
    > that image stored in a designated directory and publish the name of the
    > image back to the database. Not with displaying the image in the grid -
    > that is pretty straight forward. But once I display it, the user needs
    > to be able to update or insert a new image via an HTTP file upload control.
    >
    >
    > JpMaxMan wrote:
    > > Greetings - I have found very little definitive information on this.
    > > From what I can surmize at some point the ability to update an image in
    > > the gridview using the imagefield was removed from the final version of
    > > asp.net 2.0?
    > >
    > > If this is the case, does anyone have any work arounds for how to use a
    > > edit template to allow a user to browse and upload a replacement image
    > > when editing a row?
    > >
    > > If this is not the case, what is the trick to get more than just a text
    > > field with the image path stored in the db when editing the row?

    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Mar 14, 2006
    #3
  4. JpMaxMan

    JpMaxMan Guest

    Peter - thanks very much for your response, the silence has been
    deafening ;) I thought of this and I also had a working implementation
    that used a pop-up to upload the image. However, this seems kludgey and
    it seems to me that the user should be able to do this when they
    "insert" or "update" a record with the other fields. This would
    essentially make it a two step process to add info to the data grid,
    then click on the HTMLInputFile control in the grid once the new record
    was populated. Similarly, if you wanted to update information and an
    image you'd have to first update the info then update the image.

    Thank you for the suggestion - I'm just surprised that many others have
    not wanted to do this! I try to stay away from the bleeding edge ;)

    Peter Bromberg [C# MVP] wrote:
    > Why don't you try putting an HTMLInputFile (input type="file") control in a
    > column next to each image? Then you can use a combination of ItemDatabound to
    > correctly populate and the postBack to capture an uploaded image.
    >
    > Peter
    JpMaxMan, Mar 15, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,858
    =?Utf-8?B?RFdT?=
    Mar 15, 2006
  2. Ryan Liu
    Replies:
    1
    Views:
    603
    Alexey Smirnov
    Feb 5, 2009
  3. JpMaxMan

    ASP.NET 2.0 ImageField Upload Image Insert / Update

    JpMaxMan, Mar 8, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    138
    JpMaxMan
    Mar 8, 2006
  4. whyman
    Replies:
    4
    Views:
    916
    whyman
    Mar 23, 2006
  5. lego

    asp.net 2.0 gridview ImageField link

    lego, Mar 29, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    379
Loading...

Share This Page