ASP.net server controls allows adaptive rendering, which means the HTML
markup of a server control can vary from browser to browser. I did a simple
test of a Panel server control and looked at the HTML source of Internet
Explorer 6 and Firefox 1.0 (Mozilla).
If you are using the .NET Framework 1.1, a Panel server control will render
the contents of a Panel surrounded by a <div> element (for example, if you
have this:
<asp:Panel runat="server">
Test
</asp:Panel>
the HTML in IE will be:
<div>
Test
</div>
The extra whitespace shouldn't matter with your styling.) However, if that
same page is viewed in the newest Firefox, the .NET 1.1 Framework renders
this:
<table cellpadding="0" cellspacing="0" border="0" width="100%"><t r><td>
Test
</td></tr></table>
I found it very strange the developers of .NET would do this, but you have
to remember that .NET 1.x came out several years ago, before Firefox was
even thought of. Needless to say, anything you have inside the Panel server
control will remain intact. It's just what's surrounding it that changes
from browser to browser.
If you're curious, I also tried this with the latest 2.0 build of the .NET
framework. Both browsers rendered the <div> way.
Happy coding,
Johann MacDonagh
"Raghu Raman" <ra************ @rediffmail.com > wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
Hi,
am a biginner in .net designing.Does the panel control is enough to act
as a container .Because if , i design my controls in textboxes rows&
cols , i heared that the aclignment won't change in run time across the
browsers.
is it true? if the panel provides guaruntee that it keeps the controls
alignment same in runtime across the browsers, i can very well use the
panel control instead of tables ,to make it easier to control in server
side.
Please give u r comments
Regards
a drop in the ocean.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!