Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 23rd, 2009, 03:06 PM
Authorized User
Join Date: Jan 2009
Posts: 23
Thanks: 10
Thanked 0 Times in 0 Posts
Default Using File structure in ASP.NET

I have an application which is beginning to take shape. I have an Admin folder, which can only be accessed when the user is logged in.

I have the main page built on a master page and as such there are some links that won't work when I am inside the folder structure; ie when I try to navigate to 'Home' from within the /Admin/Asmin.aspx page it cannot find it. I assume this is something to do with absolute links.

Is there some way to direct every link via the home page? Because I think if this was the case, all the links could be found once a user has passed the particular login criteria.

I have got a site map working, and I know that the breadcrumb feature works from wherever the user is.
  #2 (permalink)  
Old February 23rd, 2009, 04:16 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts

Make sure you use the tilde (~) character which automatically resolves server control URLs.

<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="~/Home.aspx" />
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

if (this.PostHelpedYou)
The Following User Says Thank You to Lee Dumond For This Useful Post:
Spider (February 23rd, 2009)
  #3 (permalink)  
Old February 23rd, 2009, 05:30 PM
Authorized User
Join Date: Jan 2009
Posts: 23
Thanks: 10
Thanked 0 Times in 0 Posts

Thanks a lot! - that was an easy one to fix, I was coming at it from old school html:
<ahref="Default.aspx">Default.aspx</a></p> - no surprise it wouldn't work!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter File Types in ASP.NET File Upload ramuis78 ASP.NET 2.0 Basics 2 May 31st, 2007 10:50 AM
How to view the remote file structure on ur machin Goldee J2EE 0 January 25th, 2006 03:57 AM
File to Structure? TheShadow C++ Programming 3 October 23rd, 2004 05:29 AM
thePhile (VB) file folder structure... jaspe BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 1st, 2004 08:24 PM

All times are GMT -4. The time now is 04:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.