The Load_Page of this control is not running, can any one help me ?
PortalMenu.ASMX Control...
*****************************************************
<%@ Import Namespace="ASPNetPortal" %>
<%@ Control language="c#" Inherits="ASPNetPortal.PortalMenu" AutoEventWireup="false" CodeBehind="PortalMenu.ascx.cs" %>
<table>
<tr>
<td>
<asp:datalist id="menutabs" cssclass="OtraOpcionBg" repeatdirection="vertical" ItemStyle-Height="25" SelectedItemStyle-CssClass="OpcionBg" ItemStyle-BorderWidth="1" EnableViewState="false" runat="server">
<ItemTemplate>
<a href='<%= Request.ApplicationPath %>/DesktopDefault.aspx?tabindex=<%# Container.ItemIndex %>&tabid=<%# ((TabStripDetails) Container.DataItem).TabId %>' class="OpcionMenu">
<%# ((TabStripDetails) Container.DataItem).TabName %>
</a>
</ItemTemplate>
<SelectedItemTemplate>
<span class="OpcionSeleccionada"><%# ((TabStripDetails) Container.DataItem).TabName %></span>
</SelectedItemTemplate>
</asp:datalist>
</td>
</tr>
</table>
Code Behind PortalMenu.ASMX.CS
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace ASPNetPortal
{
public abstract class PortalMenu : ASPNetPortal.PortalModuleControl
{
protected System.Web.UI.WebControls.DataList menutabs;
private void Page_Load(object sender, System.EventArgs e)
{
PortalSettings portalSettings = (PortalSettings) HttpContext.Current.Items["PortalSettings"];
int tabIndex = portalSettings.ActiveTab.TabIndex;
ArrayList authorizedTabs = new ArrayList();
int addedTabs = 0;
HttpContext.Current.Response.Write("Prueba");
for (int i=0; i < portalSettings.DesktopTabs.Count; i++)
{
TabStripDetails tab = (TabStripDetails)portalSettings.DesktopTabs[i];
if (PortalSecurity.IsInRoles(tab.AuthorizedRoles))
{
authorizedTabs.Add(tab);
}
if (addedTabs == tabIndex)
{
menutabs.SelectedIndex = addedTabs;
}
addedTabs++;
}
menutabs.DataSource = authorizedTabs;
menutabs.DataBind();
}
private void Page_Init(object sender, EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
}
#region Web Form Designer generated code
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}