.NETGURU
Automatic Browser compatability
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngclient' list.


Mike Simon
-- Moved from [aspngfreeforall] to [aspngclient] by Michiel van Otegem <Click here to reveal e-mail address> --

I read somewhere that .net automatically detects the client browser and
recreates the page so that it will be displayed correctly in that
browser. Is there any truth to that and if so, how? I can changed the
schema, but it doesn't allow for me to select ALL browsers :)

Mike

Reply to this message...
 
    
Andy Smith
asp.net detects the browser, and sends the Page either a HtmlTextWriter =
or a Html32TextWriter to render into.

from there, the webcontrols themselves are responsible, somewhat, for =
making sure their output is ok with the browser.

for instance, the Html32TextWriter knows that "div" isn't a valid tag in =
html 3.2. Therefore, when a webcontrol tells it's writer to render the =
tag "div", the Html32TextWriter turns that into a one-celled table.

however, if the webcontrol just outputs plain text to the writer, then =
there is no translation.

at the end of the day, it's up to the webcontrol authors to make sure =
that their rendering process takes full advantage of the writer's =
knowledge of the html version it was designed to write.

I'm not sure I understand your second question about schemas and =
selecting browsers.

__
Andy Smith
Keyboard Jockey #3a7-2.78.1

[Original message clipped]

Reply to this message...
 
    
Michiel van Otegem
ASP.NET indeed checks the browser and changes rendering of server =
controls accordingly (not of the plain HTML in the page). The problem is =
that this doesn't always work properly (try autoformatting and absolute =
positioning with a datagrid and the look at it in Netscape 4... doesn't =
look good, without absolute positiong most goes pretty well).
There are differences between the different browsers that ASP.NET is =
unable to tackle, just because some browsers don't support them (like =
colored borders in a table). Even setting ASP.NET to target a low-end =
browser by default doesn't help.
You can manipulate the default target browser in two ways:
-Set the clientTarget directive and target an alias (Warning! if you =
choose UpLevel, then downlevel browsers will not work). You can define =
your own aliases in machine.config.
-Set the Active Schema to something different (VS.NET support versions =
of IE and Netscape 3.0 by default). This effectively changes how ASP.NET =
(or actually VS.NET) sets up the page at DESIGN-TIME. This will of =
course influence how the resulting page is rendered at RUN-TIME. You can =
see this effect by switch from Design view to HTML view after changing =
the Active schema.

---
Michiel van Otegem
ASPFriends.com Moderation Team

ASPNL.com - ASP/ASP.NET/XML Teacher
http://www.aspnl.com
http://www.aspalliance.com/michiel
---
Teach Yourself XSLT in 21 Days
http://www.amazon.com/exec/obidos/ASIN/0672323184/aspnlcom-20

----- Original Message -----
From: "Mike Simon" <Click here to reveal e-mail address>
To: Click here to reveal e-mail address
Sent: Fri, 2 Aug 2002 15:40:41 -0500
Subject: Automatic Browser compatability
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.Html32TextWriter
System.Web.UI.HtmlTextWriter




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification