Solved

Find a control inside a Telerik control

Posted on 2009-03-28
2
2,188 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:ApexCo
2 Comments
 
LVL 10

Expert Comment

by:jabcoco
ID: 24045730
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.
0
 
LVL 8

Accepted Solution

by:
ApexCo earned 0 total points
ID: 24111768
Just wanted to update, I solved my issue.

Once I moved my code for finding the control into the databound event, everything worked perfect.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now