Welcome Guest Search | Active Topics | Sign In | Register

Setting Text of Menu Item Progrmatically Options
PMAC
Posted: Wednesday, June 10, 2009 3:27:33 PM
Rank: Member
Groups: Member

Joined: 4/15/2009
Posts: 14
I have the following code

Code: C#
public void SetMenuOptions(String WebPage, UserType UserType, EO.Web.Menu NavigationMenu)
        {
            EO.Web.BaseMenuItem _Item;
            
            //determine the calling page
            switch (WebPage)
            {
                case "EmployerContact":
                    {
                        //determine what type of user is logged in
                        switch (UserType)
                        {
                            case UserType.CareerServices:
                                {
                                    _Item = (EO.Web.BaseMenuItem)NavigationMenu.FindItem("New Contact");
                                    _Item.Visible = true;
                                    
                                    NavigationMenu.Items[1].Visible = true;
                                    NavigationMenu.Items[2].Visible = true;
                                    NavigationMenu.Items[4].Text = "LOGGED IN AS ";
                                    break;
                                }
                            case UserType.Employer:
                                {

                                    break;
                                }
                        }
                        break; break;
                    }
                default:
                    {
                        break;
                    }
            }
        }


I'm getting a type conversion error...can you help with this?
eo_support
Posted: Wednesday, June 10, 2009 3:40:04 PM
Rank: Administration
Groups: Administration

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

Unfortunately you may need to seek other resource for such errors. While we do our best to support our product, we do not review or troubleshoot user code. You can take a look of our official support policy here:

http://www.essentialobjects.com/forum/postst1368_Product-support.aspx

If you believe there is a problem with the product, please provide detailed description about the problem and also step by step instructions on how to reproduce the problem and make sure it runs independently and demonstrates the problem:

http://www.essentialobjects.com/forum/postst3013_I-run-into-a-problem-can-I-send-over-my-code-so-that-you-can-take-a-look.aspx

Thanks!
PMAC
Posted: Wednesday, June 10, 2009 5:11:26 PM
Rank: Member
Groups: Member

Joined: 4/15/2009
Posts: 14
My question was meant to be how to set the text of a menu item object...I tried setting the Item.Text.HTML = "Some String"...this does not effect the text for the menu item...


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.