ASP.NET Menu && SiteMapDataSource

N

NvrBst

I have a couple questions. Firstly is there a way to set the style of
a MenuItem in the "MenuItem_MenuItemDataBound" event? Right now I
check to see if the e.Item is the last element and then set the
SeparatorImageUrl to a blue bar image I made. Slight problem with
this is that the bar has to be exactly the right length to match the
other borders. When I add new items I usally have to re-make the
separatorImage. It would be great if I could just do something like
"e.Item.Style = "border-bottom: solid thin blue;";" kind of thing.


Secondly, I used to have the ASPMenu coded with the "MenuItem"
properties. The navigation was always fast/instant when I clicked a
link. I just converted the menu items to the "Web.sitemap" file and
set the DataSourceID on the ASPMenu. Most the time its fast (0-1
second to move to the next page when I click). However, this one page
(which has a MSChart and uses a hidden iframe that constantly
postbacks to keep updating the data in the chart) takes anywhere from
2-15 seconds to move to any other link from the ASPMenu. When I
wasn't using the DataSourceID="SiteMapDataSource"; this didn't
happen. Is there something anyone could suggest trying to fix this?
(IE EnableViewState = false;) - Note ViewState = false didn't fix it.

I can see that the hidden IFrame is still updating the chart even
after I clicked the ASPMenu Item link to move to another page which is
the problem I'm pretty sure... Need to tell it to move immediatly
kind of thing when I click the link.


Thanks, If someone would like more info or such I can try to be more
detailed.

NB
 
N

NvrBst

I have a couple questions.  Firstly is there a way to set the style of
a MenuItem in the "MenuItem_MenuItemDataBound" event?  Right now I
check to see if the e.Item is the last element and then set the
SeparatorImageUrl to a blue bar image I made.  Slight problem with
this is that the bar has to be exactly the right length to match the
other borders.  When I add new items I usally have to re-make the
separatorImage.  It would be great if I could just do something like
"e.Item.Style = "border-bottom: solid thin blue;";" kind of thing.

Secondly, I used to have the ASPMenu coded with the "MenuItem"
properties.  The navigation was always fast/instant when I clicked a
link.  I just converted the menu items to the "Web.sitemap" file and
set the DataSourceID on the ASPMenu.  Most the time its fast (0-1
second to move to the next page when I click).  However, this one page
(which has a MSChart and uses a hidden iframe that constantly
postbacks to keep updating the data in the chart) takes anywhere from
2-15 seconds to move to any other link from the ASPMenu.  When I
wasn't using the DataSourceID="SiteMapDataSource"; this didn't
happen.  Is there something anyone could suggest trying to fix this?
(IE EnableViewState = false;) - Note ViewState = false didn't fix it.

I can see that the hidden IFrame is still updating the chart even
after I clicked the ASPMenu Item link to move to another page which is
the problem I'm pretty sure...  Need to tell it to move immediatly
kind of thing when I click the link.

Thanks, If someone would like more info or such I can try to be more
detailed.

NB

If anyone else runs into a simular problem with the slow navigation
the problem for me was fixed by switching the SiteMapDataSource to a
XMLDataSource with Cache'ing turn on. I guess the Menu was trying to
get the Web.sitemap file each time I navigated to a new page, and
since the MSChart page was constantly posting back then that
Web.sitemap request took longer than normal.

Cheers, NB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top