Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how can we set a link in the database. I want to set different link for each row data.
example: I have a database of images which i ll be display in the grid view or any other control. when user clicks on any image i want to redirect the user to the particular bigger size image he/she clicks on.

c# code only.
Posted
Comments
Sandeep Mewara 18-Sep-10 4:43am    
What have you tried? Put some effort!

save the url in the database as a string.
Populate a linkbutton with the string to act as a url
 
Share this answer
 
Comments
patelKhyati 21-Sep-10 6:51am    
its not helpful
can u please give me the code in c#?
There are two ways to do this:
1.) Save the url as a string in the database and populate it in a link button which is bound to a datagridview
2.) Save the image in richtextformat and save it in a varchar(MAX) column. (Microsoft prefers this method over BLOBS (Image and Text)), Then for each row in your datagridview, place the image (retrieved from database) to an image cell and set the size to 100 x 100. You may need to convert the richtextformat back to image or icon (I suggest icon for the thumbmarks). If the user clicks on that cell (image cell), display a Form containing only the imagebox with the image (convert richtextformat back to image).

I'm not very sure about retrieving stuff from a Thumbs.db file... but if you could explore this possibility, please let me know.

Thanks and good luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900