Solved

Find a control inside a Telerik control

Posted on 2009-03-28
2
2,206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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