Limit what controls are allowed within another control? - 09-07-2006 , 10:20 PM
In buidling custom web controls, what do you have to do to restrict what
controls are allowed inside the parent control and so only the allowable
nested ones appear in intellisense (i.e ListBox is the only thing displayed
in a DropDownList control). Anything to illustrate in the right direction to
build controls this way would be helpful. Thanks.
Re: Limit what controls are allowed within another control? - 09-10-2006 , 08:39 PM
By default a new custom control will use the span tag. But you can
change that by overriding the TagKey property. It returns a
HtmlTextWriterTag. In the case of a list control, it returns
HtmlTextWriterTag.Select. Below is the C# code to do that.
protected override HtmlTextWriterTag TagKey
You can find more here...
|Thread Tools||Search this Thread|