Hi TS,
Sorry for the delay.
Based on my understanding, your question is actually about how ASP.NET
renders differently for different browser/device.
If you take a look at the WebControl.RenderBeginTag using Reflector
(
http://www.aisto.com/roeder/dotnet/), you will see it's calling into the
HtmlTextWriter.RenderBeginTag to do the rendering. The default
HtmlTextWriter renders HTML 4.0-compliant markup; and the Html32TextWriter,
which renders HTML 3.2-compliant markup. (The Html32TextWriter class is
derived from the HtmlTextWriter class)
When the Page class enters its render stage, it starts by creating a new
HtmlTextWriter instance. It determines what class instance to create -
HtmlTextWriter or Html32TextWriter - by inspecting the TagWriter property
of the Browser object. The Browser object contains read-only properties
that provides information about the browser that was used to request the
page. A web browser is identified by its User-Agent string.
Whenever a Web browser requests a page, it sends along a User-Agent string
in the HTTP headers that is used to identify the browser. The ASP.NET
engine examines the User-Agent string to determine the value for the
Browser's properties.
Therefore for your original question about overriding
WebControl.RenderBeginTag, as long as you're using the HtmlTextWriter
reference to output the text, it should still be adaptive for different
browser/device.
Hope this helps. Please feel free to let me know if there's anything
unclear. Thanks.
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.