PC Review


Reply
Thread Tools Rate Thread

ASP.NET Menu && SiteMapDataSource

 
 
NvrBst
Guest
Posts: n/a
 
      9th Jan 2008
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
 
Reply With Quote
 
 
 
 
NvrBst
Guest
Posts: n/a
 
      17th Jan 2008
On Jan 9, 2:04*pm, NvrBst <nvr...@gmail.com> wrote:
> 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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<newbie> SiteMapDataSource Jeff Microsoft ASP .NET 1 28th Nov 2008 03:44 PM
SiteMapDataSource shapper Microsoft ASP .NET 0 25th Sep 2006 03:59 PM
hide root menu item (no sitemapdatasource used!) Daves Microsoft ASP .NET 2 22nd Apr 2006 12:56 AM
Using menu control with sitemapdatasource gjergj@hotmail.com Microsoft ASP .NET 0 4th Nov 2005 09:00 PM
Using menu control with sitemapdatasource gjergj@hotmail.com Microsoft ASP .NET 0 4th Nov 2005 09:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 AM.