|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Type comparisonsI am parsing controls in vb.net and I need to detect if a control is of a
particular type - as follows: if control.gettype = system.web.ui.htmlconrols.htmlform then ' do something here end if I have used TypeOf, Is, and all kinds of other things I could think of, but the compiler keeps telling me that system.web.ui.htmlconrols.htmlform is a Type and can't be used as an expression. How can I perform this comparison? Thanks, and sorry if this is a silly question. Michael "Michael Rich" <mr***@michaelrich.com> schrieb: \\\>I am parsing controls in vb.net and I need to detect if a control is of a > particular type - as follows: > > if control.gettype = system.web.ui.htmlconrols.htmlform then > ' do something here > end if > > I have used TypeOf, Is, and all kinds of other things I could think of, > but > the compiler keeps telling me that system.web.ui.htmlconrols.htmlform is a > Type and can't be used as an expression. If TypeOf Control Is System.Web.UI.HtmlControls.HtmlForm Then ... End If /// -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
DataReader in Excel (Better Post than the last)
Update for VS .NET 2003? Help with some code? for loop ending condition Compiler errors due to temp file inconsistencies ?? Remove items from listbox How to use Regex to Parse this String open binary file and search hex string Problems with the excel find function in vb.net newbie question regarding repeater control |
|||||||||||||||||||||||