Home Search Member List Faq Register Login  
UltimateTabstrip
Re: ascx control within Tab

Thread Starter: pja   Started: 11-29-2012 7:47 AM   Replies: 1
 Karamasoft Support Forums » General Discussions » UltimateTabstrip » Re: ascx control within Tab
 Printable Version    « Previous Thread   Next Thread »
  29 Nov 2012, 7:47 AM
pja is not online. Last active: 11/29/2012 7:47:49 AM pja

Not Ranked
Joined on 11-29-2012
Posts 1
ascx control within Tab

Hello, I am missing something basic I believe. I am familiar with other Tab controls, but cannot get the following functionality to work with UltimateTabStrip.

I have a custom user ascx control (tag MBC below)  within a tab. The user control also contains the UltimateEditor. I would like to alter the UltimateEditor content from the admin.aspx page. I cannot seem to gain access to the custom control? I see your examples of "tabstrip.findcontrol()" for simple controls, but none for custom user controls. What is the C# to accomplish this? Referencing the "ucMessageBody" control directly does not work (does not exist in current context).

Thank you for any guidance.

Admin.aspx:

<kswc:UltimateTabstrip id="UltimateTabstrip1" runat="server" Scheme="SimpleHorizontal">

<Tabs>
<kswc:Tab ID="utTab1" HeaderText="Message">

<ContentTemplate>

<mbc:MessageBody ID = "ucMessageBody" runat = "server" />

</ContentTemplate>

</kswc:Tab>

</kswc:UltimateTabstrip>

 

MessageBody.ascx:

<table width = "99%">

<tr>

<td>
<cc1:UltimateEditor id="UltimateEditor1" runat="server" EditorSource="~/UltimateEditorInclude/UltimateEditor.xml"></cc1:UltimateEditor>

</td>

</tr>

</table>


  
  30 Nov 2012, 12:46 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: ascx control within Tab
It seems that you should use the FindControl method twice. Once to find the user control (ucMessageBody) and then to find the UltimateEditor control (UltimateEditor1) inside your user control.

We don't know the exact type of your MBC but you can use somethign similar to the following code and replace MBC with your own type:

MBC mbcControl = (MBC)UltimateTabstrip1.FindControl("ucMessageBody");

Then,

UltimateEditor ueControl = (UltimateEditor)mbcControl.FindControl("UltimateEditor1");

  
 Page 1 of 1 (2 items)
Karamasoft Support Forums » General Discussions » UltimateTabstrip » Re: ascx control within Tab

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.