.net - How to set multiple field for HyperLinkColumn in a DataGrid using DataNavigateUrlField -


i trying create datagrid hyperlinkcolumn uses 2 fields url.
using vb, vs 2005, .net 2

i getting exception:
"a field or property name 'primkey,iscommercial' not found on selected data source."

i not sure why, have check following.

  • the fields spelt correctly.
  • the fields in datasource.
  • the fields work simple bound columns.

here example of trying do.

<asp:hyperlinkcolumn sortexpression="logno" datanavigateurlfield="primkey, iscommercial" datanavigateurlformatstring="../clarifications.aspx?primkey={0}&iscommercial={1}" datatextfield="logno" headertext="logno" itemstyle-wrap="false"></asp:hyperlinkcolumn> 

i ended solving templatecolumn.
example:

<asp:templatecolumn headertext="logno" sortexpression="logno">    <itemtemplate>       <a href="../clarifications.aspx?primkey=<%# container.dataitem("primkey").tostring() & "&iscommercial=" & container.dataitem("iscommercial") %>"><%#eval("logno")%></a>    </itemtemplate> </asp:templatecolumn> 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -