Link to home
Start Free TrialLog in
Avatar of ApexCo
ApexCoFlag for United States of America

asked on

Find a control inside a Telerik control

I'm having some issues finding a control nested 2 levels deep.

My primary container is a RadPageView and I need to find a control inside of a Formview nested inside of that. My target is the following control:

 <asp:Image ID="NPPhoto" runat="Server" CssClass="detailPhoto" />

I placed my structure in the code snippet section. I have the following code, but it's not working.

        Dim imageURL As String
        If (UserID = "" Or Not System.IO.File.Exists(Server.MapPath("~/images/profile_images/" & UserID & ".jpg"))) Then
            imageURL = "~/images/notavailable.gif"
        Else
            imageURL = "~/images/profile_images/" + UserID + ".jpg"
        End If
        Dim Photo As Image = CType(NPProfile.FindControl("NPPhoto"), Image)
        Photo.ImageUrl = imageURL
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="3">
            <telerik:RadPageView ID="RadPageView1" runat="server">
                <asp:FormView ID="NPProfile" runat="server">
                    <ItemTemplate>
                    <div id="Desc_Photo">
                                <asp:Image ID="NPPhoto" runat="Server" CssClass="detailPhoto" />
                            </div>
                        <div class="Desc_Container">

Open in new window

Avatar of jabcoco
jabcoco
Flag of Canada image

I will suggest post on Telerik forum.
It's free and all question i've ask on their forum has receive a anwser before 48h.

http://www.telerik.com/community/forums.aspx

Register, it's free, and free for trial user too.
ASKER CERTIFIED SOLUTION
Avatar of ApexCo
ApexCo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial