using asp:HyperLink

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
 
B

Bruce Barker

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)
 

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

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top