GridView and html

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
 
G

Guest

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>
 
G

Guest

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top