FindControl equivalent for Assembly

ckj

New Member
Is there a way to do something like FindControl on a Assembly like Microsoft's TabStrip (Namespace="Microsoft.Web.UI.WebControls")?<BR><BR>Why I want to do this ...<BR><BR>Within a UserControl I create a reference to the Parent. I want to then create a reference to the Microsoft tabStrip control in order to locate the index of the selected Tab. I Dim an object of the same type as the Tabstrip (Microsoft.Web.UI.WebControls.TabStrip) and then do the following to make my reference:<BR><BR>===================<BR>Dim oTabStrip As Microsoft.Web.UI.WebControls.TabStrip<BR><BR>oTabstrip = CType _<BR> ( _<BR> objParent.FindControl("msTabstrip"), _<BR> Microsoft.Web.UI.WebControls.TabStrip _<BR> )<BR><BR>=========================<BR><BR>This does not work ... oTabstrip = Nothing.<BR><BR>- thnx for any ideasWell I figured out a way to do this as long as you know the name of the parent page and are willing to make the Tabstrip Public:<BR><BR>================================<BR>UserControl.ascx<BR>================================<BR>Dim oParent As WebForm1<BR>Dim oTabstrip As Microsoft.Web.UI.WebControls.TabStrip<BR>Dim intTabIndex As Integer<BR>'<BR>oTabstrip = oParent.tsTabstrip<BR>intTabIndex = oTabstrip.SelectedIndex<BR><BR>================================<BR>WebForm1.aspx<BR>================================<BR>Public WithEvents tsAcademy As Microsoft.Web.UI.WebControls.TabStrip
 
Back
Top