ApexCo
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(Serv er.MapPath ("~/images /profile_i mages/" & UserID & ".jpg"))) Then
imageURL = "~/images/notavailable.gif "
Else
imageURL = "~/images/profile_images/" + UserID + ".jpg"
End If
Dim Photo As Image = CType(NPProfile.FindContro l("NPPhoto "), Image)
Photo.ImageUrl = imageURL
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(Serv
imageURL = "~/images/notavailable.gif
Else
imageURL = "~/images/profile_images/"
End If
Dim Photo As Image = CType(NPProfile.FindContro
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">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.