1

Web ポータルを作成していますが、リンクの使用について少し混乱しています。問題は。

私のアプリケーションはhttp://localhost/applicacion/default.aspx (アプリケーションはアプリケーションディレクトリです)

リンクを貼ると、次の場所に移動<a href="../Admin/defaultadmin.aspx">Link</a>します

http://localhost/Admin/defaultadmin.aspx  instead of take me to ---> http://localhost/applicacion/Admin/defaultadmin.aspx

次に、リンクを試してみます

http://localhost/applicacion/Admin/defaultadmin.aspx but if i am in another part of the site like http://localhost/applicacion/sales/defaultsales.aspx it takes me to 
http://localhost/applicacion/sales/Admin/defaultadmin.aspx witchs is wrong !!

アプリケーションディレクトリがインストールで変更される可能性があるため、その部分が動的でなければならないことを念頭に置いて、リンクが常に同じポイントに移動する正しい組み合わせは何ですか<a href="Application/Admin/defaultadmin.aspx">Link</a>。ユーザーがインストールする可能性があるため、リンクを配置できないことを意味します別の Web サイトで。

ありがとう !!

4

1 に答える 1

2

次の方法で親ディレクトリに移動するように指定してい../ます:

<a href="../Admin/defaultadmin.aspx">Link</a>

サブディレクトリに移動する場合は、を省略して、サブ../ディレクトリの名前と目的のページを使用します。

<a href="Admin/defaultadmin.aspx">Link</a>
于 2012-07-18T15:59:17.750 に答える