开发者

Dynamic NavigationURL in ASP.NET taken from MySQL database

开发者 https://www.devze.com 2023-03-06 21:07 出处:网络
I\'m trying to make an extra field in 开发者_如何学Ca ListView control in ASP.NET to link to another page using the ID from that entry in the URL.

I'm trying to make an extra field in 开发者_如何学Ca ListView control in ASP.NET to link to another page using the ID from that entry in the URL.

Currently trying

<asp:HyperLink 
        ID="HLDisasterDetails" 
     runat="server" 
      Text="Disaster Details" 
   NavigateUrl=<% "~/DisasterDetails.aspx?Disaster_ID=" & 
                Eval("Disaster_ID") %> />

which doesn't work.

Help would be greatly appreciated

~M


Add a # Symbol

    NavigateUrl=<%# "~/DisasterDetails.aspx?Disaster_ID=" &                 
    Eval("Disaster_ID") %> />

-RVR

0

精彩评论

暂无评论...
验证码 换一张
取 消