문제

<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?

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top