hyperlinkcolumn and DataNavigateUrlFormatString in DataGrid

G

Guest

hello!

It would seem trivial that you might want to pass more than just one
variable to the next page with a hyperlink. This would be:
'nextpage.aspx?var1=1&var2=2'.

However, I cannot see how I can get the grid to do this via the
hyperlinkcolumn.

I am probably missing something very obvious. Thank you for your help!

-Bahman
 
G

Guest

Hello Bahman,

The HyperLinkColumn.DataNavigateUrlField property takes only one datafield
name. You cannot compose the link from 2 different data fields. In your
scenario you might consider the normal Hyperlink object instead, e.g.

<a href='page.aspx?var1=<%# DataBinder.Eval(Container.DataItem,
Var1Field")%>&var2= said:
<%# DataBinder.Eval(Container.DataItem, "DataTextFieldName")%></a>
 

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

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top