473,396 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

hot to insert image path

hi
I am creating travels project,
I have to sstore image path in the sqlserver and i want to retrive image in the datagridview.. please sought out my problem..
athank you
raghu
Dec 17 '07 #1
1 2320
dip_developer
648 Expert 512MB
hi
I am creating travels project,
I have to sstore image path in the sqlserver and i want to retrive image in the datagridview.. please sought out my problem..
athank you
raghu
image path is a simple string...what is the problem inserting a string???!!!

to show your image in Datagridview just assign the ImageUrl property of your Image control[in the gridview] to the stored path in the database.....

Expand|Select|Wrap|Line Numbers
  1.  
  2. int i=0;
  3. foreach(DataGridItem dgItem in Datagrid2.Items)
  4. {    
  5.  ((Image)dgItem.FindControl("imgProd")).ImageUrl=dsProduct.Tables[0].Rows[i].ItemArray.GetValue(0).ToString();
  6.     i+=1;
  7. }
  8.  
here..
dsProduct.Tables[0].Rows[i].ItemArray.GetValue(0).ToString()
is the image path.......adjust your index in GetValue() method......
Dec 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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...
1
by: janet | last post by:
hi i created a table and a field with blob datatype. now i want to insert an image into the mysql database. i tried through normal insert command adn realised i cannot do that way.. I want to...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
3
by: JpMaxMan | last post by:
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...
3
by: jenp | last post by:
Hello I've got a rather tricky problem here - i'm looking to insert a graph into a web page - which is represented as a jpeg image. Due to the restrictions of the framework i'm developing...
0
by: gazanfar | last post by:
Yes thanks Question is that ---I want to insert image/or image path in my SQlServer 2000 through Visual basic application.like after scan of any photo i want insert in database on whoever's no...
0
by: avisekrishi | last post by:
Hi , I have 100 image . I need to follow the following steps 1. Open a word document 2. Click on Insert -> Picture -> File and then open the image file 3. The Image gets opened in Word.
11
by: Evolution445 | last post by:
I got this code, and it somehow doesnt work. <TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"> <TR> <TD background="{image-path}navfiller.gif" HEIGHT=40...
3
by: wizardry | last post by:
hello - ive inserted user names, etc. into the longblob but the path to the image is giving me a bit of a trouble. do i need to change a mimi type or transformation of some sort? i've...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.