问题描述
大家好,
我有一个母版页(Project>> MasterPages>>> MainPage.master),并且该页中的某些图像带有一些路径,例如"../../Images/bg_main_menu.png".
我以两种形式引用此母版页.这些路径中的一种形式在路径中:项目>> Forms>> Form1.aspx,另一种形式是:Project>> Forms>> NewFolder>> Form2.aspx
现在对于Form2.aspx,图像不会被加载.
我使用〜Images/bg_main_menu.png"尝试了图像路径.但这不起作用.
有人可以帮忙吗?
问候,
Snigdha
Hi All,
I have got a master page(Project>>MasterPages>>MainPage.master) and some images in that page with some path like "../../Images/bg_main_menu.png".
I refer this master page in two forms. One of those form is oresent in the path : Project>>Forms>>Form1.aspx and the other one is : Project>>Forms>>NewFolder>>Form2.aspx
Now for Form2.aspx the image is not getting loaded.
I tried the image path with "~Images/bg_main_menu.png". But it is not working.
Can somebody help?
Regards,
Snigdha
推荐答案
〜Images/bg_main_menu.png".
"~Images/bg_main_menu.png".
在TILDA(〜)之后,在Images之前,您缺少正斜杠.
〜/Images/....
You are missing a forward slash after TILDA (~), before Images.
~/Images/....
这篇关于母版页中的相对路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!