Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Need Help:How to get the pageid on click of a menu item?


 I am using a MenuList to generate a menu.menu consists of pages like HOME,CONTACT,ABOUT US,CAREER etc.

Now I need to get the  pageid of that corresponding page on click of a menu item.

How to get the pageid of that corresponding pagelink ? pls Help. Thanks in Advance.



<%@ Control Language="C#" EnableViewState="false" AutoEventWireup="False" CodeBehind="Menu.ascx.cs"    Inherits="Templates.Public.Units.Static.Menu" %>

<EPiServer:MenuList runat="server" ID="Menu">  
            <EPiServer:Property PropertyName="PageLink" runat="server" />




  protected override void OnLoad(System.EventArgs e)
            Menu.PageLink = EPiServer.Core.PageReference.StartPage;            

Jun 19, 2009 12:47

Not sure if i understand what you are asking for, but you can get the pageID from a pagelist frontend like this:


 and from backend you always have this:


 -Kjetil Simensen

Jun 19, 2009 16:05
He means that he'd like to click on "contact us" and get the page ID of "28" from contact us' link. He'd then programmatically like to use that elsewhere.
Jun 24, 2009 14:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.