asp:hyperLink NavigateURL and Eval functions

后端 未结 2 1157
予麋鹿
予麋鹿 2021-01-27 01:17

What is the correct syntax to add a Eval() function to the NavigateURL attribute of asp:HyperLink?

I am trying to achieve the below:

NavigateUrl=\"http:/         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-27 02:11

    Try with this

     NavigateUrl='http://home/?<%# Eval("U_ID") %>'
    

    or

     NavigateUrl='<%# "http://home/?" + (string)Eval("U_ID") %>'
    

提交回复
热议问题