Saturday, March 24, 2012

Panel, ASP.NET 2.0 and Firefox

Hello,
I'm just curious. When using asp:panel in ASP.NET 1.1 pages I get div tag in IEbut table in Firefox, and I believe in all other browsers not based on IE. Isthis changed in ASP.NET 2.0? Is div served to any browser?

Second would be validation. Do we still have "up level" and "downlevel" browsers? Does client validation work on more than one browser?

I've heard that both would be fixed in 2.0, so i just ran a little test for you...
Code:

<asp:PanelID="Panel1"runat="server">This is some text inside Panel 1</asp:Panel>
<br/>
<asp:TextBoxid="Text1"runat="server"/>
<asp:RequiredFieldValidatorrunat="server"ControlToValidate="Text1"ErrorMessage="Required!"EnableClientScript="true">Required!</asp:RequiredFieldValidator>
<br/>
<asp:ButtonID="btnCheck"runat="server"Text="Go"/>

Panel HTML Generation:
- IE and FireFox :)
<div id="Panel1">
This is some text inside Panel 1
</div>
Validation Results:
- Both IE and Firefox showed "Required" on the client :-)
So while that may not be too "official" of testing, it appears they are treated the same


Client-side validation serves more browsers in 2.0. There is also a new feature called Validation Groups which allows you to have multiple submit buttons on the page the fire their own validators. There's still plenty oflimitations, which is why I builta replacementto it.

0 comments:

Post a Comment