我想知道什么是<%= 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初学者问题
发布评论