如何动态更改ASP.NET中链接的文件夹路径 [英] How to change the folder path of links in ASP.NET Dynamically

查看:83
本文介绍了如何动态更改ASP.NET中链接的文件夹路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<a "<%= Application["ImgSection"].ToString() %>"/ACR Total TPDoc Volume.jpg" rel="facebox" data-tooltip="sticky16">ACR Total TPDoc</a>





大家好,

谁能告诉我如何更改
动态路径.
请注意,我只需要更改文件夹路径,文件名将附加到该路径.

即;/ACR总TPDoc Volume.jpg应该附加到<%= Application [" ImgSection].ToString()%>"

谢谢.
Kishor



Hi All,

Can anyone please tell me how to change the
path dynamically.
Please note I just need to change the folder path and the file name will be appended to this path.

i.e ;/ACR Total TPDoc Volume.jpg should be appended to "<%= Application["ImgSection"].ToString() %>"

Thank you.
Kishor

推荐答案

只需追加这两个字符串即可.

Just append those two strings.

<a href="<%= Application["ImgSection"].ToString() + "/ACR Total TPDoc Volume.jpg" %>" >ACR Total TPDoc</a>



考虑Codeproject.com中的ImgSection



Consider the ImgSection in Codeproject.com

Application["ImgSection"] = "http://www.codeproject.com/images";



然后您的链接将如下所示

ACR TPDoc总图像(将鼠标悬停在此链接上时,请查看示例URL的状态栏)



Then your link will looks like below

ACR Total TPDoc Image (Look at the status bar for the sample URL while mouse over this link)


这篇关于如何动态更改ASP.NET中链接的文件夹路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆