473,545 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0 ImageField Upload Image Insert / Update

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
3 2784
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
11742
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
1
2495
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks- John
6
1830
by: Shawn | last post by:
Hi. I'm letting the users upload images into a sybase 12.5 database. The problem is that when ContentLength exceeds 131 071 an exception occur. The e.Message property is empty so it doesn't tell me much. I know that images much larger than this exist in the database. Any help is appreciated! Here is my code: Dim cn As New Connection Dim...
4
1768
by: Kevin | last post by:
for uploading image, I can use System.Web.UI.WebControls.HtmlInputFile libary in codebehind. but if resolution size is too big, I want to resize the picture to 800X600 and then do upload(save image). how can I do that? what library do I need to use?
4
5884
by: Jim Michaels | last post by:
after a file upload, $_FILES is not populated but $_POST is. what's going on here? $_POST=C $_POST=C $_POST=C $_POST=C:\\www\\jimm\\images\\bg1.jpg $_FILES= $_FILES= $_FILES=
0
1186
by: kbutterly | last post by:
Good morning all, I have a product database in which I store some images. I have created a showThumbnail.aspx page to display the thumbnail image. This page has no code on it, just the Page directive. The code behind, showThumbnail.aspx.vb, has this in the Page_Load: Dim productID As Integer =...
0
1988
by: aris1234 | last post by:
hello.. How to upload image file in page update ..?? i have logic like this : if user upload new image then old image must delete and update DB used new name if user not upload new image then old image no delete. code form like this (i dontknow this code right or wrong, please correction if wrong) :
1
9089
by: udivyaprakash | last post by:
Hi guys, I have doing my php project using mysql. My problem is how to upload a image in database.but i got a coding in internet and implemented.But dont know how to update that image. That is im uploading the clients images while they register in the registration form.Ill give one username and password and they can login through it.
0
2274
by: vinothrao84 | last post by:
Hi, i have the below gridview code in my asp.net c# page. Problem is i having an error saying that "A field or property with the name 'ProfileID, Image' was not found on the selected data source.". This ProfileID and Image column is available in the database table. I not sure why the gridview can't find it. <asp:GridView...
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
701
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.