Welcome Guest Search | Active Topics | Sign In | Register

ContentMenu not worked Options
Maxim
Posted: Friday, December 26, 2008 8:19:10 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" MasterPageFile="~/MainMasterPage.Master" Inherits="Partners.ACD.WebSite.Test" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<eo:ContextMenu runat="server" ID="ContextMenuId" RaisesServerEvent="true"
ControlSkinID="None" Width="360px" ContextControlID="MyTest">
<TopGroup>
<Items>
<eo:MenuItem Text-Html="MSDN Home"></eo:MenuItem>
<eo:MenuItem Text-Html="Library"></eo:MenuItem>
<eo:MenuItem Text-Html="Download">
<SubMenu>
<Items>
<eo:MenuItem Text-Html="Developer Downloads">
</eo:MenuItem>
<eo:MenuItem Text-Html="Subscriber Downloads">
</eo:MenuItem>
<eo:MenuItem Text-Html="Microsoft Download Center">
</eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem Text-Html="My MSDN">
</eo:MenuItem>
</Items>
</TopGroup>
</eo:ContextMenu>
<div runat="server" id="MyTest" style="border:solid 1px black; width:200px; height:200px;">

</div>

</asp:Content>

The ContextMenu not showed.
Where am I wrong?
eo_support
Posted: Friday, December 26, 2008 8:22:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The ContextControlID needs to be the full client ID of the control, not just the ID. For a server control that resides inside another server control (in this case myTest resides inside Content1), these two are usually different. You can view the page source to see the full client ID. Set ContextControlID to that value and it should work.

Thanks!
Maxim
Posted: Friday, December 26, 2008 8:50:55 AM
Rank: Advanced Member
Groups: Member

Joined: 12/26/2008
Posts: 45
eo_support wrote:
Hi,

The ContextControlID needs to be the full client ID of the control, not just the ID. For a server control that resides inside another server control (in this case myTest resides inside Content1), these two are usually different. You can view the page source to see the full client ID. Set ContextControlID to that value and it should work.

Thanks!


Thanks. It working.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.