|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enabling/Disabling a Tab in a TabStripHi all!
I put a TabStrip in my webform, and, in some events, I need to disable some Tabs in the TabStrip... I try this: Microsoft.Web.UI.WebControls.Tab t; t = (Microsoft.Web.UI.WebControls.Tab)this.mpMy.FindControl("tab1"); but I have a error: Cannot convert type 'System.Web.UI.Control' to 'Microsoft.Web.UI.WebControls.Tab' any ideas? TIA, Yuki! I cannot see that Tab is the child or descendent class of
System.Web.UI.Control. It's inheritance goes like this, Object->BaseChildNode->TabItem->Tab. So you cannot use FindControl() for locating a Tab at runtime. However TabStrip does inherit from Control so you can use FindControl to locate that and examine it's Items collection for your tab, then disable your tab. Regards.
Problem with User Control and unset references to controls within
error in adding user controls at runtime Fitting a table inside an ASP Panel error using .NET CrystalReportViewer (.NET 1.1 VS.NET 2003) Gridview PostBack Problems WebControl rendering in frontpage 2003 - Migrating from Visual Studio 2003 to 2005 GridView Height InputAttributes in RowCreated (gridview) Re: Binding two fields in the DataNavigateUrlFormatString Calendar control in a datagrid returns wrong date |
|||||||||||||||||||||||