• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2265
  • Last Modified:

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"
            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">
                    <div id="Desc_Photo">
                                <asp:Image ID="NPPhoto" runat="Server" CssClass="detailPhoto" />
                        <div class="Desc_Container">

Open in new window

1 Solution
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.


Register, it's free, and free for trial user too.
ApexCoAuthor Commented:
Just wanted to update, I solved my issue.

Once I moved my code for finding the control into the databound event, everything worked perfect.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now