I want to find the first occurrence of a image control in the childnodes collection
currently I am just looping through till I find the first one with a tagname of "img"
is there a better way to do this?
also is it possible to cast/convert an element to its htmlobject ex: img element to HtmlImage?
1 Answer, 1 is accepted
0
Cody
Telerik team
answered on 01 Nov 2010, 08:49 PM
Hi Andrew,
To find the first <img> child node you can use code like this:
This code assumes "cell" is of type HtmlTableCell.
To case a base Element to an Html object type use the .As<> function like this:
HtmlDiv divElem = elem.As<HtmlDiv>();
Greetings,
Cody
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items