How to make ItemClick event work on RadMenu

I need a server side function when I click LogOff RadMenuItem. I used ItemClick event on RadMenu.
<div style="height: 20px; width: 100%;">            
       <telerik:RadMenu ID="RadMenu1" runat="server" Style="float: none; width:100%; "
                Skin="Black" ItemClick="LogoffClick">                
                <Items>                
                    <telerik:RadMenuItem Text="HOME" NavigateUrl="Home.aspx">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="QUERY" NavigateUrl="Query.aspx">
                    <Items>
                    <telerik:RadMenuItem Text="LISTING" NavigateUrl="View.aspx">
                    </telerik:RadMenuItem>
                    </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="Record" NavigateUrl="Record.aspx">
                    <Items>
                     <telerik:RadMenuItem Text="CREATE" NavigateUrl="create.aspx"></telerik:RadMenuItem>
                     <telerik:RadMenuItem Text="SEARCH" NavigateUrl="Search.aspx"></telerik:RadMenuItem>                    
                     </Items>                    
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="REPORT" NavigateUrl="Report.aspx">
                     <Items>
                     <telerik:RadMenuItem Text="HISTORY"></telerik:RadMenuItem>
                     </Items>
                    </telerik:RadMenuItem>

                    <telerik:RadMenuItem Text="LOGOFF" ></telerik:RadMenuItem>                
                </Items>
            </telerik:RadMenu>
 </div>  

C# side -  
protected void LogoffClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
{
       Telerik.Web.UI.RadMenuItem ItemClicked = e.Item;
       Response.Write("Server event raised -- you clicked: " + ItemClicked.Text);
}

I can complipe and run the application, but cannot debug into the above LogoffClick function. When I click the LOGOFF menu, nothing happens. I need to do sonething inside the function. Please help.
I take reference from http://www.telerik.com/help/aspnet-ajax/menu_serversideitemclick.html
LVL 1
minglelinchAsked:
Who is Participating?
 
MlandaTCommented:
Your declaration looks incorrect there ItemClick="LogoffClick" should be OnItemClick="LogoffClick"
<telerik:RadMenu ID="RadMenu1" runat="server" Style="float: none; width:100%;" Skin="Black" OnItemClick="LogoffClick">  

Open in new window

0
 
minglelinchAuthor Commented:
Hm ... my careless? It has taken me two days.
Thank a lot,  MlandaT.
0
 
minglelinchAuthor Commented:
good comments.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.