Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am tring to find html image control which is in gridview iteam template. I am using following code for this:
HtmlImage img=(HtmlImage)GridViewUserScraps1.Rows[index].FindControl("imagename");

but it returns null value. I want source of html image control.

plz help

What I have tried:

I am tring to find html image control which is in gridview iteam template. I am using following code for this:
HtmlImage img=(HtmlImage)GridViewUserScraps1.Rows[index].FindControl("imagename");

but it returns null value. I want source of html image control.

plz help
Posted
Updated 12-Apr-16 0:00am
Comments
Karthik_Mahalingam 12-Apr-16 4:37am    
post the markup code for the item template
F-ES Sitecore 12-Apr-16 5:06am    
You can only do this if the img element has runat=server
Do you have runat server with that control?

1 solution

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