CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 9/18/2007 4:09:53 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 78 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
clivey
Asp.Net User
SiteMapPath and Menu problem relating to "virtual path"9/18/2007 4:09:53 AM

0

Hi All,

I'm fairly new to asp.net 2.0, so please bare with me if this is actually a fairly simple problem :(

I've code and tested the controls (menu and sitemappath, both loading from the default web.sitemap file) in my local testing machine.  They work perfectly as I expected. (Menu will highlight the selected item, the sitemappath will show the breadcrum-like navigation).

However, since I'm using "virtual shared hosting" (godaddy) and that all my relative links ("~/home.aspx") will become ("http://www.mysite.com/_virtual_path_/home.aspx").
[Note: the _virtual_path_ is a directory which I setup in my hosting for this specific website.  I cannot use the ROOT as the hosting account has several different websites "under" it.]

So, I try using "absolute links" ("/home.aspx")  and I no longer have the virtual-path-in-url problem and all pages load properly in this new-url-format.

Both my menu and sitemappath control is NOT working properly.  It seems like they can't "match" the url (without virtual-path) with the url (abs links) stored in the web.sitemap file. Menu can be displayed, but since it can't match the url, the selected item will not be highlighted (change css class).  As for the sitemappath, it totally disappear.

If I use relative-links in my web.sitemap, the menu and sitemappath WILL work, but my client doesn't accept the the virtual-path-in-url problem.

Thanks for any help.

 

Clive
 

 

 


maheshsingh
Asp.Net User
Re: SiteMapPath and Menu problem relating to "virtual path"9/18/2007 4:30:48 AM

0

I am using following URL in my site map and it is working fine.... with me.

<siteMapNode  url="Default.aspx"  title="Home"   description="Home" /> 

 

is there any difference in you code ?


------------------------------------------------------------------------------------
Dont forget to click "Mark as Answer" on the post that helped you.
------------------------------------------------------------------------------------
~Mahesh

clivey
Asp.Net User
Re: SiteMapPath and Menu problem relating to "virtual path"9/18/2007 4:54:57 AM

0

Hi Mahesshsingh,

Thanks for your suggestions, but using [url="Default.aspx"] is the same as using a "relative path" [~/xxx.xxx] and the result is the "virtual-path-in-url" problem.

 
Clive
 

clivey
Asp.Net User
Re: SiteMapPath and Menu problem relating to "virtual path"9/18/2007 5:31:20 AM

0

Hi,

 Just want to clarify my problem:

 
Situation #1: Use "~/xxx.xxx" url in web.sitemap

problem: Will have "virtual-path-in-url" problem.

Potential Solution: I tried to code something like "url rewriting" (googled some turtorial) and redirect/rewrite-path so it will hide the "virtual-path".  However, I can't find a way of doing it.  If I use the following methods: (where RelPath and HttpPath are some url strings I assigned)

RelPath would be something like "/_virtual_/page.aspx" 

HttpPath would be something like "http://domain/page.aspx" 

if (fullOrigionalpath.Contains(matchSpecialPath)) { 

            Server.Transfer(RelPath);
            Server.Transfer(HttpPath);
            Response.Redirect(HttpPath);
            Server.Execute(RelPath);
            Server.Execute(HttpPath);
            Context.RewritePath(fullOrigionalpath);

 }  *** Obviously, I only ran ONE of the above in the if statements, not all of them :)


All of the above method either causes error (can't transfer OUT of a virtual directory) or the redirect it infinitely.

Clive

 

clivey
Asp.Net User
Re: SiteMapPath and Menu problem relating to "virtual path"9/18/2007 5:37:41 AM

0

 Continue from my previous post,

 

Situation #2: Use "/xxx.xxx" style url in web.sitemap

problem: Menu and Sitemappath won't work properly, most importantly SiteMapPath doesn't show up (I can live with Menu NOT being "selected")

Potential Solution:  Try to manually match (select) the right node within the sitemappath / menu.

However, I've no idea how to do it in Sitemappath.  For menu, someone did gave me some coding suggestions and I will try it out now.

 

For the record, I rather solve Situation #2 and so no one will see my virtual-directory at all.  In Situation #1, the best we can do is to "redirect" a url with the virtual-directory to one that "hides" it.  So, the user will still see the virtual directory from the "status bar" when they hover over a link.

 

Thanks for any help. 

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
SiteMapPath Methods (System.Web.UI.WebControls) Binds a data source to the SiteMapPath control and all its child controls. .... MapPathSecure, Retrieves the physical path that a virtual path, ...
How can i create a sitemap navigation wizard for my website The virtual path '/ICD.sitemap' maps to another application, which is not allowed. .... NET then why don't you use the SiteMapPath control ? ...
Ease Web site navigation by implementing ASP.NET's SiteMapPath ... NET 2.0's Menu, SiteMapPath, and TreeView navigation controls. ... NET 2.0 SiteMapPath control displays a navigation path, which allows users to understand ...
Parag's Weblog Application Virtual Path: /. Application Path: ..... sitemap related with manager should get loaded in the SiteMapPath control otherwise sitemap ...
Inside Microsoft: Structuring an ASP.NET 2.0 Site using Master ... NET 2005 and select File | Open | Web Site... from the main menu. Enter the path to the MediaLibrary folder in the dialog and open it - the site can then be ...
UISuite Note that "/" is not required at the end of the virtual path. ..... SitemapPath Display: You can display your navigation path (breadcrumb) in several ...
CoDe Magazine - Article: Creating Web Sites with ASP.NET 2.0 This saves you the step of creating the virtual directory in IIS but obviously you ..... Selecting the Auto Format… option from the SiteMapPath Tasks menu ...
SiteMapPath Members (System.Web.UI.WebControls) The following tables list the members exposed by the SiteMapPath type. ..... MapPathSecure, Retrieves the physical path that a virtual path, either absolute ...
Website Navigation tion of the path to move to that page.) Once again, the SiteMapPath has been ..... Once again, the problem is that the. Menu binds directly to MenuItem ...
Creating Web Sites with ASP.NET 2.0 This saves you the step of creating the virtual directory in IIS, but obviously you ..... option from the SiteMapPath Tasks menu (displayed by clicking the ...






view a template page?

math with dates

paypal post from .net 2.0 master page, should be easy, how?????

reading from one table, writing to another in loop

threading

using other .cs files

"ugly" ui controls

database user control problem

enum

reminder in asp.net

needs help with a project that has 3 panels

form within a form!

problem access db with connection string

how to disable a simple image button on second click

convert string to 'directoryinfo'

returning multiple resultsets?

add new forum?

virus scanning integration

places to start

deploying asp.net project - missing assemblies??

how to configure download dialog...

login control with oracle possible?

regular expression help needed.

database report

response.reditect not working from global.asax.cs

how to update my application on the server?

how many ways r there that you can save session.

inherit and codefile doesn't work

problem with codebehind

errors not writing to event log

   
  Privacy | Contact Us
All Times Are GMT