D
Don Wash
Hi There!
I'm creating my website with ASP.NET + XHTML, which means I will strictly
adhere the XHTML standards for my web page output.
I use Panel or PlaceHolder WebControls to place dynamically created
<div></div> contents to my web pages.
But the problem arises when because Panel and PlaceHolder WebControls do
extra work with <span> tags as follows...
Panel Control...
<div><span></span><div>
PlaceHolder Control...
<span><div><div></span>
In XHTML, it is not allowed to nest a <div> tag within a <span> tag. So
PlaceHolder control is now out of the question. So I use Panel control but
then it inserts the <span> tag inside the <div> tag (which is valid by the
way) BUT I need to insert <div> content to the Panel control from server
side. So the final output become something like this...
Using Panel Control...
<div><span><div id="MyOwnContent">Test</div></span><div>
So as you can see, now my "MyOwnContent" <div> tag is inside auto generated
<span> tag of the Panel control. So now my web page XHTML is invalid again.
How do I workaround this? Is there any properties that will turn off from
..NET automatically inserting <span> tags?
Thanks in advance,
Don
I'm creating my website with ASP.NET + XHTML, which means I will strictly
adhere the XHTML standards for my web page output.
I use Panel or PlaceHolder WebControls to place dynamically created
<div></div> contents to my web pages.
But the problem arises when because Panel and PlaceHolder WebControls do
extra work with <span> tags as follows...
Panel Control...
<div><span></span><div>
PlaceHolder Control...
<span><div><div></span>
In XHTML, it is not allowed to nest a <div> tag within a <span> tag. So
PlaceHolder control is now out of the question. So I use Panel control but
then it inserts the <span> tag inside the <div> tag (which is valid by the
way) BUT I need to insert <div> content to the Panel control from server
side. So the final output become something like this...
Using Panel Control...
<div><span><div id="MyOwnContent">Test</div></span><div>
So as you can see, now my "MyOwnContent" <div> tag is inside auto generated
<span> tag of the Panel control. So now my web page XHTML is invalid again.
How do I workaround this? Is there any properties that will turn off from
..NET automatically inserting <span> tags?
Thanks in advance,
Don