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

Suneesh E.S.
Member since: 2009

 I am using a MenuList to generate a 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;            

#30774 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

    #30776 Jun 19, 2009 16:05
  • Karl Alesbury
    Member since: 2009
    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.
    #30845 Jun 24, 2009 14:11