error asp:Literal change position tag html after assign value?
<asp:Literal ID="literal" runat="server" >
</asp:Literal>
i using string have value below
<div class="TopNewsTab">
<div class="news-category">
<div class="c1">
<div class="c11">
</div>
<div class="c12" />
<div class="c13" />
</div>
<div class="news-content">
</div>
</div>
<div class="news-category">
<div class="c1">
<div class="c11">
</div>
<div class="c12" />
<div class="c13" />
</div>
<div class="news-content">
</div>
</div>
</div>
after i using literal.Text= valueover;
when display on page i used firebug see content become
<div class="TopNewsTab">
<div class="news-category">
<div class="c1">
<div class="c11">
</div>
<div class="c12" />
**<div class="news-category">
<div class="c1">
<div class="c11">
</div>
<div class="c12" />
<div class="c13" />
</div>**
<div class="news-content">
</div>
</div>
<div class="c13" />
开发者_StackOverflow </div>
<div class="news-content">
</div>
</div>
</div>
position of <div class="news-category">
change position before assign literal please help me the problem ??
Don't self close your <div/>
tags. I know it seems like it should technically be valid in XHTML, but it causes problems.
So just change
<div class="c12" />
<div class="c13" />
to
<div class="c12" ></div>
<div class="c13" ></div>
精彩评论