Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

show default arrow in asp.net menu

Posted on 2010-11-08
16
Medium Priority
?
1,394 Views
Last Modified: 2012-05-10
with
 protected void Page_Load(object sender, EventArgs e)
    {
        pnlmenu.Controls.Clear();
        Menu menu01 = PopulateMenu();

        menu01.StaticEnableDefaultPopOutImage = false;

it has turn off the default in the menu, while on another menu which wants the arrows by using
pnlsitemap.Controls.Clear();
        Menu menu02 = PopulateSitemap();

        menu02.StaticEnableDefaultPopOutImage = true;

the arrows does not come out.
0
Comment
Question by:doramail05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
16 Comments
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34082594
Hi,
i you are using static menu then only u can give StaticEnableDefaultPopOutImage  
else use DynamicEnableDefaultPopOutImage
0
 
LVL 1

Author Comment

by:doramail05
ID: 34082604
still can't :<
pnlsitemap.Controls.Clear();
        Menu menu02 = PopulateSitemap();
        menu02.Font.Underline = true;
        menu02.DynamicEnableDefaultPopOutImage = true;

        pnlsitemap.Controls.Add(menu02);
        pnlsitemap.DataBind();

Open in new window

0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34082648
Hi,
give image path like this
  DynamicPopOutImageUrl="~/images/greenarrow.gif"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:doramail05
ID: 34082961
nope, not getting it,
pnlsitemap.Controls.Clear();
        Menu menu02 = PopulateSitemap();
        menu02.Font.Underline = true;
        menu02.DynamicEnableDefaultPopOutImage = true;
        menu02.DynamicPopOutImageUrl = "~/images/whitearrow.png";
        pnlsitemap.Controls.Add(menu02);
        pnlsitemap.DataBind();

Open in new window

0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34082976
hi,

I have tried i am able to do ..
just check u have folder for images and images in that images folder ..
Also try with gif images rather that png
0
 
LVL 1

Author Comment

by:doramail05
ID: 34083132
tried jpg, yet :(
pnlsitemap.Controls.Clear();
        Menu menu02 = PopulateSitemap();
        menu02.Font.Underline = true;
        menu02.StaticEnableDefaultPopOutImage = true;
        menu02.DynamicEnableDefaultPopOutImage = true;
        menu02.DynamicPopOutImageUrl = "~/images/whitearrow.jpg";
        pnlsitemap.Controls.Add(menu02);
        pnlsitemap.DataBind();

Open in new window

0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34083245
Hi,
Add url for each menu item
Ex :
Menu mnu = new Menu();
             
                MenuItem item = new MenuItem("Aarthi");
               
                item.Text = "asas";
                //item.ImageUrl = "~/bullet.png";
                MenuItem item1 = new MenuItem("Aarthi123");
                // item1.ImageUrl = "~/bullet.png";
                item1.Text = "asas2342";
                item.ChildItems.Add(item1);
                mnu.Items.Add(item);
                pnl.Controls.Add(mnu);
0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34083248
Hi ,
U can try this also

<asp:menu id = "navigationMenu"
   dynamicdisplaylevels=2
   dynamicsubmenuindent=10
   dynamicpopoutimageurl = "~/images/popout.jpg"
   dynamicpopoutimagetextformatstring = "More..."
   runat = "server">

0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34083327
Can i Know which version of asp.net u were workingg on ?
0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34083427
Hi ,
menu02.StaticPopOutImageUrl = "~/images/whitearrow.jpg";
now it will work i have checked .
0
 
LVL 1

Author Comment

by:doramail05
ID: 34083590
this will work, but it appear in the bottom of menu text. The PopOutImageUrl does not come out any image.
categoryItem1.NavigateUrl = dt.Rows[0]["pageurl"].ToString();

                                    categoryItem1.SeparatorImageUrl = "images/whitearrow.png";
                                    
                                    menusitemap.Items.Add(categoryItem1);
                                   
                                    menusitemap.Orientation = Orientation.Horizontal;

Open in new window

0
 
LVL 1

Author Comment

by:doramail05
ID: 34083681
worked this way, but actually wanted the arrow to appear after the menu text, trying imagealign.right but couldnt.

categoryItem.NavigateUrl = dt3.Rows[0]["pageurl"].ToString();
categoryItem.ImageUrl = ImageAlign.Right.ToString();
categoryItem.ImageUrl = "images/whitearrow.png";
menusitemap.Items.Add(categoryItem);
menuarrow.JPG
0
 
LVL 2

Expert Comment

by:AarthiPrabakaran
ID: 34083701
Hi,

Imageurl will appear like this ....when u add image url .

add this
menu.StaticPopOutImageUrl  = "~/images/whitearrow.jpg";

My sample code :

 Menu mnu = new Menu();
                mnu.DynamicPopOutImageUrl = "~/bullet.png";
                mnu.StaticPopOutImageUrl = "~/bullet.png";
                mnu.CssClass = "subMenu";
               
                MenuItem item = new MenuItem("Aarthi");
               
                item.Text = "asas";
               
                MenuItem item1 = new MenuItem("Aarthi123");
               
                item1.Text = "asas2342";
               item.ChildItems.Add(item1);
               
                mnu.Items.Add(item);
                pnl.Controls.Add(mnu);
0
 
LVL 1

Author Comment

by:doramail05
ID: 34089128
didnt work, :(

private Menu PopulateSitemap()
    {
        menusitemap = new Menu();
        menusitemap.DynamicPopOutImageUrl = "images/whitearrow.jpg";
        menusitemap.StaticPopOutImageUrl = "images/whitearrow.jpg";
        ...
0
 
LVL 1

Accepted Solution

by:
doramail05 earned 0 total points
ID: 34215795
worked with adding an <asp:Image .. > and bind it in the menuItem. it worked,
0
 
LVL 1

Author Closing Comment

by:doramail05
ID: 34237320
solved at this time only
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question