Hi there,
You need to make the constant part of the URL a part of the databinding expression. E.g.:
<a href='<%# @"~\Nominations\votes.aspx?ContestantID=" + DataBinder.Eval(Container.DataItem,"ContestantID") %>' runat="server">fsdfsf</a>
Rather than using double quotes you need single quotes for the href attribute. And, in order to successfully use the ~ in the address, you need runat="server" on the control as well.
The @ is needed in C# to escape the slashes in your URL. However, since these are likely web URLs, this is probably better:
<a href='<%# "~/Nominations/votes.aspx?ContestantID=" + DataBinder.Eval(Container.DataItem,"ContestantID") %>' runat="server">fsdfsf</a>
Hope this helps,
Imar
Last edited by Imar; June 2nd, 2010 at 12:29 PM..
|