CodeBehind (HyperlinkColumn)
-
How can I get the value of more then one column? Dim hlc As New HyperLinkColumn hlc.HeaderText = "Airport" hlc.DataNavigateUrlField = "AirportCode" hlc.DataTextField = "AirportCode" hlc.DataNavigateUrlFormatString = "javascript:PostIt('{0}','{1}','" & StringValue & "');" I would like {1} to be the paired data from another column in the datatable. I know that in ASP2 you can do DataNavigateUrlFields = "col1, col2" is there an alternative for asp11?
-
How can I get the value of more then one column? Dim hlc As New HyperLinkColumn hlc.HeaderText = "Airport" hlc.DataNavigateUrlField = "AirportCode" hlc.DataTextField = "AirportCode" hlc.DataNavigateUrlFormatString = "javascript:PostIt('{0}','{1}','" & StringValue & "');" I would like {1} to be the paired data from another column in the datatable. I know that in ASP2 you can do DataNavigateUrlFields = "col1, col2" is there an alternative for asp11?
In the ASP.NET 1.x, you use the TemplateColumn instead. To populate the value of the column based on multiple columns, you can use the data binding expression. Another option is that you can populate the value from other columns in the event handler of the ItemDataBound event or you can do that using the datasource.