Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > text directly the <form> element violates the rules of xhtml

Reply
Thread Tools

text directly the <form> element violates the rules of xhtml

 
 
Tony Johansson
Guest
Posts: n/a
 
      07-17-2011
Hello!

What does it mean when a text say "adding text directly inside the <form>
element violates the rules of xhtml.
Here I have some code and it's no problem to add a static text like Testing
inside the form tag like I have done here.
So axactly what does it mean what a text say "adding text directly inside
the <form> element violates the rules of xhtml"

<form id="form1" runat="server">
Testing
<div>
<asp:Button ID="cmd" style="POSITION: absolute; left:150px;
top:61px;"
runat="server" Text="Button" />
</div>
<asp:Label ID="Label1" runat="server" Text="testing"></asp:Label>
</form>

//Tony


 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      07-17-2011
On 7/16/2011 8:22 PM, Tony Johansson wrote:
> What does it mean when a text say "adding text directly inside the<form>
> element violates the rules of xhtml.
> Here I have some code and it's no problem to add a static text like Testing
> inside the form tag like I have done here.
> So axactly what does it mean what a text say "adding text directly inside
> the<form> element violates the rules of xhtml"
>
> <form id="form1" runat="server">
> Testing
> <div>
> <asp:Button ID="cmd" style="POSITION: absolute; left:150px;
> top:61px;"
> runat="server" Text="Button" />
> </div>
> <asp:Label ID="Label1" runat="server" Text="testing"></asp:Label>
> </form>


As far as I can see then it is well formed XML.

I don't know XHTML good enough to say whether it should validate
as XHTML.

I would suggest writing it like:

<form id="form1" runat="server">
<p>Testing</p>
<div>
<asp:Button ID="cmd" style="POSITION: absolute; left:150px;
top:61px;"
runat="server" Text="Button" />
</div>
<asp:Label ID="Label1" runat="server" Text="testing"></asp:Label>
</form>

Arne


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Update/insert an xml element's text----> (<element>text</element>) HANM XML 2 01-29-2008 03:31 PM
java.lang.LinkageError: Class violates loader constraints sk Java 0 10-25-2007 12:14 AM
Electronic program guide violates TV copyright Lawrence D'Oliveiro NZ Computing 31 10-21-2006 08:22 AM
javax.swing.ButtonGroup's add method violates implied contract Kent Paul Dolan Java 22 12-22-2005 08:01 PM



Advertisments