Saturday, March 24, 2012

oledataadapter

I am using an oledataadapter to recieve data from a table. Allthe data I need is recieved, but one thing I cant figure out is killingme. One of my links I want to have data from the dataadpter,something like this
<A href="http://links.10026.com/?link=post.aspx?postid=<%# Container.dataitem('Post') %>"
however, that doesnt seem to work, what am I doing wrong?
<A href="http://links.10026.com/?link=post.aspx?postid=<%# Container.dataitem('Post') %>">

Try this:

<A href='<%# DataBinder.Eval(Container.DataItem, "Post", "post.aspx?postid={0}") %>' > Link Text </A>

0 comments:

Post a Comment