ASP.NET Href not going to subfolders

Posted on 2007-10-13
Last Modified: 2013-11-26
I am working on a web site using a master page using Visual Web Studio 2008. I have the project in a folder MyDocuments/visual studio 2008/master page/. I have put diferent sections of the site in different folders. you can see the different folders I am using in the solution explorer. I have two problems.

The first one is that when I do an Href and select the link from the list of files in the project and when I run the project the links dont work properly. I get a page not found. I have tried these 3 combinations  "forums/default.asp", "/forums/default.asp" and "~/forums/default.asp". None of them seem to work.

Secondly, when I try to include an image in one of the pages I want to put the images in the images folder but I get broken images. I have a feeling the solution to my above problem will also solve this problem.

The solution I would like to find is the one that will allow me to upload the site from my system and have everything work fine. I have tried Running IIS for my project but I get a configuration error os some sort. All I have done to set up IIS is point to the home directory of my project. This has worked in the past for me with regular ASP. Is there a guide somewhere to configuring IIS to run an ASP.NET project?
Question by:dmat1
    LVL 16

    Accepted Solution

    To solve this problem, you may take one of the following approaches:

    * Use absolute URL paths in the Master Page, for example <img src="/myapplication/images/banner.gif" />
    * Use relative or application-relative URLs in server controls instead of static markup, for example <asp:Image ImageUrl="~/images/banner.gif" runat="server" />

    Also, check what link generated in the browser after project run.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now