asp:hyperLink NavigateURL and Eval functions

后端 未结 2 1160
予麋鹿
予麋鹿 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 01:52

    It wasn't works my site. I found the following solution:

    NavigateUrl='<%# string.Format("~/Home.aspx?{0}", HttpUtility.UrlEncode(Eval("U_ID").ToString())) %>'
    

提交回复
热议问题