By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,841 Members | 840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,841 IT Pros & Developers. It's quick & easy.

ASP.NET 2.0 ImageField Upload Image Insert / Update

P: n/a
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?
Mar 14 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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?

Mar 14 '06 #2

P: n/a
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?

Mar 14 '06 #3

P: n/a
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

Mar 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.