ASP.NET 4.0 Route expression builder inside Listview control
        Posted  
        
            by Carlos Lone
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Carlos Lone
        
        
        
        Published on 2010-03-11T19:20:39Z
        Indexed on 
            2010/03/11
            19:24 UTC
        
        
        Read the original article
        Hit count: 296
        
One of the features of ASP.NET 4.0 is Route Expression builder which allows you to set up hyperlinks like this:
<asp:HyperLink 
    runat="server" 
    NavigateUrl="<%$ RouteUrl:RouteName=productos,categoria=Cereales,id=2 %>" >Productos</asp:HyperLink>
Now I'm wondering if I can use this sort of syntax inside a ListView Control, I know is possible, but the tricky thing is that I want to genereate de route key value dynamically. So instead to write id=2 I would like to write id=<%# Eval("CategoryID") %> .
Can I do that?, if so, how should I write it.
Thanks for your help!
© Stack Overflow or respective owner