Treeview Styles Aren't working

G

GroupReader

I have an ASP.Net 2.0 Treeview control that works fine in one virtual
directory, but not another. Same webpage, but accessed with a
different virtual path. Can anyone shed any light on the reason?

Here's the situation:
1) I have a website called "MyWebSite"
2) MyWebSite is accessible via two different virtual directories in
IIS:
- http:// localhost / MyWebSite, and
- http:// localhost / AnotherWebSite / MyWebSite
3) When I access my treeview page like this, it works:
- http:// localhost / MyWebSite / MyTreeviewPage.aspx
4) When I access my treeview page like this, it doesn't work
- http:// localhost / AnotherWebSite / MyWebSite /
MyTreeviewPage.aspx

Specifically, what does not work is all of the styles like nodeStyle,
hoverNodeStyle, selectedNodeStyle, etc... The styles don't show up at
all. I think it has something to do with the *.axd resource files, but
I can't figure out what. When I navigate directly to the *.axd files
by copying-and-pasting the urls into the browser, they all seem to
download just fine.

Also, my page has a MasterPage. Could this have something to do with
it??

Any help would be appreciated.

Thanks,
-dms
 
G

GroupReader

After my original post, I verified that the problem *does* have
something to do with the master page. If I remove the master page, I
no longer have the problem. So... the problem has something to do with
the combination of the (1) MasterPage, (2) TreeView Control, and (3)
mutiple virtual directories. Please help, I'm really stumped.

Thanks again,
-dms
 
G

GroupReader

Solution: Give the master page an id: This is a well-known quirk with
master pages.


In master page:

void Page_Load
{
ID="mp";
}
 
P

Phil H

Dear GroupReader

I've got a problem with Treeview Styles as well but it's different to
yours.

My problem is that, for some reason if I try to use a home-spun image
with the "ImageUrl" property of NodeStyle it works fine but If I use a
second one with the SelectedNodeStyle property it ignores it! (By that
I mean it renders the same image as in NodeStyle)

I've also noticed by experiment that changing the formating of the text
elements of SelectedNodeStyle it works OK.

Have you or anyone else found this?
 

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

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top