If (YOUR VARIABLE) = True Then
hyp.NavigateUrl = "~/URL?Query=" & e.Item.DataItem("SQLDATA").ToString
Else
hyp.NavigateUrl = "~/URL2.aspx?Query=" & e.Item.DataItem("SQLDATA").ToString
End If
How to dynamically change NavigateURL string?
-
28-06-2022 - |
Question
<asp:HyperLink ID="hyp" RunAt="Server" NavigateUrl='<%# "~/URL.aspx?Query=" + DataBinder.Eval(Container.DataItem, "QueryID").ToString() %>'>
How to replace the URL.aspx part of this string in VB code behind while maintaining querystring?
OR
How to set the querysting in VB codebehind?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow