I have a template column in a DataGrid that I want to be a hyperlink.
When I build the NavigateUrl portion of the asp:HyperLink element, I have
this:
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.DemoNumber",
"Patient.aspx?DemoNbr={0}") %>'>
My link turns out great at run-time and looks like:
NavigateUrl=Patient.aspx?DemoNbr=12345
My question is, can't the NavigateUrl be built in two parts? Something like
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.DemoNumber",
"Patient.aspx?DemoNbr={0}") %>
<%# DataBinder.Eval(Container, "DataItem.ChartNumber", "&ChartNbr={0}") %>'>
(both of the above lines are together in the actual code)
The goal would be for the link to look like
NavigateUrl=Patient.aspx?DemoNbr=12345&ChartNbr=54321
Every time I run it this way, I get:
Overload resolution failed because no accessible 'ToString' accepts this
number of arguments
If you can, please bail this idiot out before it gets any later!
Thanks
I needed to change my ASP code to look like:
NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.DemoNumber",
"Patient.aspx?DemoNbr={0}") + DataBinder.Eval(Container,
"DataItem.ChartNumber", "&ChartNbr={0}") %>'>
"Earl Damron" <earld...@mail.com> wrote in message
news:eTUX747fCHA.1960@tkmsftngp12...
i our aspx page put in the column <%# createlink(dataite
("xx"),....) %> etc
and in the sub procedure build your output link
return "xxx.aspx?d=" & e1.tostring ....
Does this make sense? it works for me!
>.
>