Dynamic Menu Creation - loses menu in MasterPage

5 posts, 0 answers
  1. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 03 Nov 2008 Link to this post

    Hi..
    I have a Menu in a MasterPage.
    On the page Load of the menu I create an additional menu option. As soon as you navigate to another page the 'custom' dynamic option goes away. Any ideas?
    thanks!

     

    protected void Page_Load(object sender, EventArgs e)

     

    {

     

     

    if (Session["OFFICECODE"] == null)

     

    {

    Session[

    "OFFICECODE"] = SecurityManager.GetOfficeCode(HttpContext.Current.User.Identity.Name);

     

    Session[

    "Office_Table"] = SecurityManager.GetOfficeCodeData(Session["OFFICECODE"].ToString());

     

     

     

    if (((Admin.OfficeCodeDataTable)Session["Office_Table"]).Rows.Count != 0)

     

    {

     

    RadMenuItem NewItem = new RadMenuItem();

     

    NewItem.ForeColor = System.Drawing.

    Color.Blue;

     

    NewItem.Text = ((

    Admin.OfficeCodeDataTable)Session["Office_Table"])[0].SenatorElect;

     

    NewItem.ToolTip = NewItem.Text;

    NewItem.Width = 375;

     

    this.RadMenu.Items.Add(NewItem);

     

    }

    }

    // end if

     

     

    }

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 04 Nov 2008 Link to this post

    Hello Jon Elster,

    Does the page that you are redirected to uses the same MasterPage?

    Kind regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 04 Nov 2008 Link to this post

    Yes... !
  4. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 04 Nov 2008 Link to this post

    Help... any ideas?
    thanks
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 07 Nov 2008 Link to this post

    Hello Jon Elster,

    I have created a sample project, but could not reproduce the problem. Maybe your scenario is a bit different. Please download my test pages and let me know how to reproduce the problem.

    Thanks

    Greetings,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top