How to use a StaticItemTemplate?

I

Ilmar

I've made an asp:menu control. Does anybody know how do I access the
current menu item text from StaticItemTemplate?

Any help would be apreciated.
 
J

John Saunders

Ilmar said:
I've made an asp:menu control. Does anybody know how do I access the
current menu item text from StaticItemTemplate?

You should be able to find the asp:Menu control by following Parent pointers
from a control within the StaticItemTemplate. Perhaps from there you can
determine the current menu item.
 
I

Ilmar

Thanks John,
I finally solved this problem by the following code:


<StaticItemTemplate>
<asp:Label Runat=server>[<%# Eval("Text") %>]</asp:Label>
</StaticItemTemplate>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top