When writing a custom control it always rendered as an HTML span element. How can I change it for example to a div?
views:
91answers:
1
+5
A:
Derive your control from WebControl as follows:
public class MyCustomControl : WebControl {
public MyCustomControl() : base(HtmlTextWriterTag.Div) {}
}
That is, use the base class constructor that accepts the tag to use.
John Saunders
2009-07-05 16:11:47