以下是我在radTextBox
内的radDock
,我在ParentPage
<telerik:RadDockZone ID="ZoneDescription" runat="server" BorderStyle="None" Width="600px">
<telerik:RadDock ID="DockDescription" runat="server" EnableDrag="false" EnableRoundedCorners="true"
Title="Itinerary Description" Width="600px" Skin="Vista" DefaultCommands="None">
<ContentTemplate>
<div style="padding-top: 5px;">
<telerik:RadTextBox ID="rtxtDescription" runat="server" Width="100%" TextMode="MultiLine">
</telerik:RadTextBox>
</div>
</ContentTemplate>
</telerik:RadDock>
</telerik:RadDockZone>
从我的孩子页面,我得到rtxtDescription
的文字值,
(((this.Parent.FindControl("ZoneDescription") as RadDockZone).
FindControl("DockDescription") as RadDock).
FindControl("rtxtDescription") as RadTextBox).Text;
和
(this.Parent.FindControl("rtxtDescription") as RadTextBox).Text;
但两者都不起作用,无法访问rtxtDescription
我该如何解决?在此先感谢:)
答案 0 :(得分:1)
请尝试使用以下代码段。
((ZoneDescription.FindControl("DockDescription") as RadDock).ContentContainer.FindControl("rtxtDescription") as RadTextBox).Text = "Your text here";