using asp:HyperLink

  • Thread starter Thread starter VJ
  • Start date Start date
V

VJ

I want to pass two variable with the <asp:HyperLink> tag but I'm a
little unsure...


i tried...
<asp:HyperLink ID="hyperlink1" NavigateUrl="tickets.aspx?time=<%#
DataBinder.Eval(Container.DataItem, "fTime",
{0:h:mm})%>&date=Calendar1.SelectedDate.ToShortDateString()"
runat="server">

i'm trying to pass a container value and the date selected...
thanks
 
you can not nest a bindinding expression inside an atrribute string, the
atrribute string must only contain a binding expression.

NavigateUrl="tickets.aspx?time=<%#
DataBinder.Eval(Container.DataItem, "fTime",
{0:h:mm})%>&date=Calendar1.SelectedDate.ToShortDateString()"

not legal, s/b

NavigateUrl="<%# "tickets.aspx?time=" +
DataBinder.Eval(Container.DataItem, "fTime",{0:h:mm}) +
"&date=" + Calendar1.SelectedDate.ToShortDateString() %>"

-- bruce (sqlwork.com)
 
Back
Top