对于参考路径ASP.NET初学者问题

编程入门 行业动态 更新时间:2024-10-22 07:22:06
本文介绍了对于参考路径ASP.NET初学者问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道什么是<%= QDAB.Constants.SiteURL%>在我的aspx页面下面一行code的意思。我做了谷歌,并没有真正找到这方面的消息。

I want to know what "<% =QDAB.Constants.SiteURL %>" means in the following line of code in my aspx page. I did google and didn't really find any information on this.

<td align="center" style="background-image: url(<% =QDAB.Constants.SiteURL %>images/Docs/Plans/myImage.jpg);

那么究竟是什么意思?

So what exactly does this mean?

[aditional的详情]

[Aditional Details]

我改变了 URL(小于(%)= QDAB.Constants.SiteURL%GT;图片/文档/计划/ myImage.jpg);

本 URL(小于(%)= QDAB.Constants.SiteURL%GT;图片/ myImage.jpg);

我在图片文件夹中复制MYIMAGE。

I copied myImage in the "Images" folder.

它为什么会访问从图像图像文件夹而不是图像/文档/计划?

Why would it access the image from "Images" folder BUT NOT "Images/Docs/Plans"?

这是太奇怪了。

推荐答案

这意味着,有一个名为SITEURL在QDAB.Constants类中定义一个常数变量。

It means that there is a constant variable defined in QDAB.Constants class called SiteURL.

最有可能是何许东西www.xyz /

Most likely it is something of the sort "www.xyz/"

使用的&lt;%=变量名称%>,该变量的值是在使用HTML

Using the <% = variable Name %>, the value of the variable is used in the HTML

什么

url(<% =QDAB.Constants.SiteURL %>images/Docs/Plans/myImage.jpg);

因此​​确实是使用可变值,它与串的创建的类型的一个完整的URL的其余部分并置它

hence does is using the variable value, it concatenates it with the rest of the string creating a complete URL of the type

url(www.xyz/images/Docs/Plans/myImage.jpg);

这就是用于设置此HTML标记的背景的图像将是位于

which is where the image used to set the background of this HTML tag is going to be located

更多推荐

对于参考路径ASP.NET初学者问题

本文发布于:2023-11-09 20:37:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:初学者   路径   ASP   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!