Articles → .NET → ASP.NET XHTML Compliance

ASP.NET XHTML Compliance















<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title> </title>
</head>

<body>
	<form name="form1" method="post" action="Default.aspx" id="form1">
		<div>
			<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZNLaISFnJOBvA0oQ9ZjtvoTDUaMl" /> </div>
	</form>
</body>

</html>












<font color="red">hi</font>






<asp:GridView ID="gvRuleThree" runat="server" HeaderStyle-BackColor="Red"> </asp:GridView>




DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("rule_3.xml"));
gvRuleThree.DataSource = ds.Tables[0];
gvRuleThree.DataBind();




<?xml version="1.0" encoding="utf-8" ?>
<root>
  <child>child1</child>
  <child>child2</child>
  <child>child3</child>
  <child>child4</child>
</root>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title> </title>
</head>

<body>
	<form name="form1" method="post" action="Default.aspx" id="form1">
		<div>
			<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE4MDE3NTcxODcPZBYCAgMPZBYCAgEPPCsADQIADxYEHgtfIURhdGFCb3VuZGceC18hSXRlbUNvdW50AgRkDBQrAAEWCB4ETmFtZQUKY2hpbGRfVGV4dB4KSXNSZWFkT25seWgeBFR5cGUZKwIeCURhdGFGaWVsZAUKY2hpbGRfVGV4dBYCZg9kFgoCAQ9kFgJmDw8WAh4EVGV4dAUGY2hpbGQxZGQCAg9kFgJmDw8WAh8GBQZjaGlsZDJkZAIDD2QWAmYPDxYCHwYFBmNoaWxkM2RkAgQPZBYCZg8PFgIfBgUGY2hpbGQ0ZGQCBQ8PFgIeB1Zpc2libGVoZGQYAQULZ3ZSdWxlVGhyZWUPPCsACgEIAgFkyryzGmoNlkjGPgqOgUEngSbk1/c=" /> </div>
		<div>
			<table cellspacing="0" rules="all" border="1" id="gvRuleThree" style="border-collapse:collapse;">
				<tr style="background-color:Red;">
					<th scope="col">child_Text</th>
				</tr>
				<tr>
					<td>child1</td>
				</tr>
				<tr>
					<td>child2</td>
				</tr>
				<tr>
					<td>child3</td>
				</tr>
				<tr>
					<td>child4</td>
				</tr>
			</table>
		</div>
	</form>
</body>

</html>








<asp:GridView ID="gvRuleThree" runat="server" HeaderStyle-BackColor="Red">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:TextBox runat="server"></asp:TextBox>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>




Picture showing the gridview with a textbox and a label

Click to Enlarge



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title> </title>
</head>

<body>
	<form name="form1" method="post" action="default.aspx" id="form1">
		<div>
			<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTkyOTE3NzczMw9kFgICAw9kFgICAQ88KwANAgAPFgQeC18hRGF0YUJvdW5kZx4LXyFJdGVtQ291bnQCBGQMFCsAARYIHgROYW1lBQpjaGlsZF9UZXh0HgpJc1JlYWRPbmx5aB4EVHlwZRkrAh4JRGF0YUZpZWxkBQpjaGlsZF9UZXh0FgJmD2QWCgIBD2QWAgIBDw8WAh4EVGV4dAUGY2hpbGQxZGQCAg9kFgICAQ8PFgIfBgUGY2hpbGQyZGQCAw9kFgICAQ8PFgIfBgUGY2hpbGQzZGQCBA9kFgICAQ8PFgIfBgUGY2hpbGQ0ZGQCBQ8PFgIeB1Zpc2libGVoZGQYAQULZ3ZSdWxlVGhyZWUPPCsACgEIAgFkZUDE/Ou3onhLafNN/QCNRfW25LU=" /> </div>
		<div>
			<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQK01eLgDQKOhc2fBQKthc2fBQLEh82fBQLjhc2fBX21d0EgZwVtkdBaWgYezHSZwHS/" /> </div>
		<div>
			<table cellspacing="0" rules="all" border="1" id="gvRuleThree" style="border-collapse:collapse;">
				<tr style="background-color:Red;">
					<th scope="col"> </th>
					<th scope="col">child_Text</th>
				</tr>
				<tr>
					<td>
						<input name="gvRuleThree$ctl02$ctl00" type="text" /> </td>
					<td>child1</td>
				</tr>
				<tr>
					<td>
						<input name="gvRuleThree$ctl03$ctl00" type="text" /> </td>
					<td>child2</td>
				</tr>
				<tr>
					<td>
						<input name="gvRuleThree$ctl04$ctl00" type="text" /> </td>
					<td>child3</td>
				</tr>
				<tr>
					<td>
						<input name="gvRuleThree$ctl05$ctl00" type="text" /> </td>
					<td>child4</td>
				</tr>
			</table>
		</div>
	</form>
</body>

</html>












<asp:TextBox ID="txtName" runat="server"></asp:TextBox>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title> </title>
</head>

<body>
	<form name="form1" method="post" action="Default.aspx" id="form1">
		<div>
			<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3NDI1ODEyMjhkZPf5p4ff8FsM3OEQHCM0SkoFkL79" /> </div>
		<div>
			<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKiwteNAgLEhISFCzdSkT4DBV3uYEShorRdOkj0h+82" /> </div>
		<input name="txtName" type="text" id="txtName" /> </form>
</body>

</html>








<asp:TextBox ID="txtName" runat="server" Text="&"></asp:TextBox>




<input name="txtName" type="text" value="&" id="txtName" />










<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title> </title>
</head>

<body>
	<form name="form1" method="post" action="Default.aspx" id="form1">
		<div>
			<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
			<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
			<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMzcxMjI5NDM1ZGSwm9MkcTa26p8riSo14DoQtkA4eA==" /> </div>
		<script type="text/javascript">
		//<![CDATA[ 
		var theForm = document.forms['form1'];
		if(!theForm) {
			theForm = document.form1;
		}

		function __doPostBack(eventTarget, eventArgument) {
			if(!theForm.onsubmit || (theForm.onsubmit() != false)) {
				theForm.__EVENTTARGET.value = eventTarget;
				theForm.__EVENTARGUMENT.value = eventArgument;
				theForm.submit();
			}
		}
		//]] >
		</script>
		<div>
			<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwKgxKq3DgLEhISFCwKSw44DkvTmJl2cpA0Ugu4P+7MfthbHkU0=" /> </div>
		<input name="txtName" type="text" value="&" id="txtName" /> <a id="lnkTest" href="javascript:__doPostBack('lnkTest','')">Test</a> </form>
</body>

</html>





Conclusion





Posted By  -  Karan Gupta
 
Posted On  -  Thursday, December 08, 2011

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250