Home All Groups Group Topic Archive Search About

formatting datagrid error

Author
13 Apr 2005 6:22 PM
Tash
Hi I'm trying to bind a xml rss feed to my datagrid. To make it look nicer
I'm trying to use the itemtemplace tag but I get this error when i trying to
run it saying that
error on Quotes values differently inside a '<% ……"value" …. %> ' block on
the line with %. Anyone know whats going on and how to get around it.



<asp:DataGrid runat="server" id="dgnews" AutoGenerateColumns="False"
Font-Name="Arial" Font-Size="10pt"

HeaderStyle-Font-Bold="True" HeaderStyle-HorizontalAlign="Center"
HeaderStyle-BackColor="Navy"

HeaderStyle-ForeColor="White" HeaderStyle-Font-Size="15pt"
AlternatingItemStyle-BackColor="#eeeeee"

Font-Names="Arial">

<AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle>

<HeaderStyle Font-Size="15pt" Font-Bold="True" HorizontalAlign="Center"
ForeColor="White" BackColor="Navy"></HeaderStyle>

<Columns>
<asp:TemplateColumn HeaderText="Category">
<ItemTemplate>

<ahref="<%# DataBinder.Eval(Container.DataItem, "link")%>">

<%# DataBinder.Eval(Container.DataItem, "title") %>
</a> (<i><%# PrintTimeOnly(DataBinder.Eval(Container.DataItem,
"datePosted")) %></i>)

                                    </ItemTemplate>
                                </asp:TemplateColumn>
                            </Columns>
                        </asp:DataGrid>

Author
13 Apr 2005 6:35 PM
Marcie Jones
Change this line:
On Wed, 13 Apr 2005 11:22:22 -0700, "Tash"
<T***@discussions.microsoft.com> wrote:

><ahref="<%# DataBinder.Eval(Container.DataItem, "link")%>

to:
<ahref='<%# DataBinder.Eval(Container.DataItem, "link")%>'

Marcie