GridView and html

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have i the db html data like :
<sapn color="#aabbcc">aaa</span>
when i see it in the GridView ->html source, isee it like
<span color=.................
the thing is that u dont wnat thesource code to show <
but rather the original html code,beacuse whn i watch at the tabblem
instead of seeing the "reslt of the html",from the above example its color,
i see only the code of the html
how can i by pass it thanks
peleg
 
Hi,
I dont think i have understood your question.But i think this is what you
are try to do and you are getting HTML Displayed instead of Color:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1" PageSize="5">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<span style="margin-right:20px;"><%# Container.DataSetIndex + 1 %></span>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</Columns>
</asp:GridView>
 
Hi,
Please ignore previous post.Try this code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1" PageSize="5">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<span style="color:#0000FF;"><%# Container.DataSetIndex + 1 %></span>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</Columns>
</asp:GridView>
 
Back
Top