Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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.
 
Old February 23rd, 2009, 04:16 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

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

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

Lee
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!





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.