Library tutorials & articles
Valid XHTML within .NET
Introduction
The first article in this series will concentrate on the HtmlForm control and its child controls, deciding how we can best modify the default implementation and extend its capabilities so that it will validate to the W3C's XHTML 1.0 and 1.1 strict standards. Additionally we'll look at how the default instance uses client-side validation and how this too can be improved.
In order to test and run sample code included in this document, a text editor and C# compiler will be required along with an ASP.NET compatible Web server. All sample code has been developed and tested using Windows 2000 Professional running IIS 5.0 and version 1.1 of the .NET Framework. There should be no issues using later versions of Windows operating system. It is also possible to use the "Mono" project's compiled source-code running on most Linux distributions.
Assumptions
The source-code in this article is written in C# and ASP.NET. It is assumed that you have a basic understanding of both C# and ASP.NET as well as the essentials of the CLR (or equivalent runtime) and its associated development tools. The code listed is CLS-compliant so you can easily replace the C# code with an alternate CLI-compatible language. It is also assumed that the requirements for creating XHTML compliant Web pages are understood.
Limitations
This article makes no provisions for the XHTML-Basic standard as this is targeted at mobile devices and thus covered by Microsoft's ASP.NET mobile controls.
XHTML 2.0 is currently unsupported by most major browsers or has yet to make recommended status and is thus out of the scope of this article. The solutions discussed here can be applied to this standard if required.
Related articles
Related discussion
-
Export Datagrid to Excel with same formatting
by BarbaMariolino (1 replies)
-
how to design a template platform which can be used to create many different pages?
by polytheme (1 replies)
-
sending sms from pc
by sriraj20074 (0 replies)
-
Capture Video
by ess-image (23 replies)
-
DataGrid - How to display the content of a hidden TemplateField on mouseover
by DonCarnage (0 replies)
Related podcasts
-
StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team
Scott chats with Jeff Atwood of CodingHorror.com and most recently, StackOverflow.com. Jeff and Joel Spolsky and their technical team have created a new class of application using ASP.NET MVC. What works, what doesn't, and how did it all go down?
Events coming up
-
Jul
7
DTC 70-528 Session 7: Chapter 12
Greenwood Village, United States
Due to lack of interest of the 5th Monday meetup, we will continue as originally scheduled. The topic of the night will be "Chapter 12 - Creating ASP.NET Mobile Web Applications", taught by RJ Hatch. It is a fairly small chapter, so we can discuss other topics as well. Pizza and beverages will be provided on a donation basis.
Have you tried putting any asp.net controls on your page, (such as an asp:button control)? I tried and got an error telling me that the "Control 'x' of type 'y' must be placed inside a form tag with runat=server". Now, I know that the control is between the form tags and runat is set to server, so what is going on?
This thread is for discussions of Valid XHTML within .NET.