I've been out of Asp.net WebForms for a while (been doing MVC for the last 2.5 years) and I obviously fell out of routine.
I would like to create a list of menu items using asp:MenuItem
server controls. It all works fine, but I'd like to provide dynamic values for NavigateUrl
properties:
<asp:MenuItem Text="Something" NavigateUrl="<%= /* some code */ %>" />
But I can't make my head to work around it. Nothing seems to work.
Edit
Beside the upper one I've also tried these two but with no luck either...
<asp:MenuItem Text="Something" NavigateUrl='<%= /* some code */ %>' />
<asp:MenuItem Text="Something" NavigateUrl="<%# /* some code */ %>" />
Anyone? Is this really that hard or what? Basically I don't want a static menu on my masterpage but a dynamic one. And I don't want to use any kind of data sources.