سؤال

I created a website which is located on my document folder at Visual Studio 2008\WebSites\MyWebsite\Orders folder.

There is no problem to open the default page when I clicked starting debugging on menu tool bar. However when I go to another page, the url is not correct because it doesn't include the website name. The URL for default page is http://localhost:64121/Orders/Default.aspx and the search page is http://localhost:64121/Search.asp. How can I change the setting to make it work without change the script on aspx page. Thank in advance.

there is the href to open another page in apsx page.

<a class="leftnavBody" href="/Search.aspx">Search Order</a></li>
هل كانت مفيدة؟

المحلول

If you have Search.aspx available in the same folder as your default.aspx, use

<a class="leftnavBody" href="Search.aspx">Search Order</a></li>

If Search.aspx is level up i.e. on root and default.aspx in some folder

<a class="leftnavBody" href="/Search.aspx">Search Order</a></li>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top