Click here to Skip to main content
15,943,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
iam new in asp.net..i have a form with two dropdownlist and 5 textboxes .when i give all the fields and then click save button..it got save in database and dropdownlist values and 4(not 5) textbox values come to gridview at same time.in gridview i added another column with image.i given in template field..what i want is when i click on this image(only in image not in anyware of row) all the values corresponding to that row should come in to the dropdownlist and textboxes.iam using c# and asp.net.Help me..(i dont want the select button).
Posted

have you tried using the ImageButton? That holds a click event. In that event
you can say

C#
ImageButton ib = (ImageButton)sender;
GridViewRow row = (GridViewRow)ib.NamingContainer;

in the row you will find all cells with data that can be used to display in the textboxes
 
Share this answer
 
Comments
Elizabath D 22-Jun-12 1:29am    
thank u for your replay..but iam not using the image button..only image..i given it inside the itemtemplate field.
Herman<T>.Instance 22-Jun-12 11:16am    
Has the Image a click event?
Hi,

Is That image control is of HTML or .net???
Whats the purpose behind that you cant take imagebutton???
If you want to take Image only than you have to do extra efforts on that.



Thanks
Ashish
 
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