且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在网页中使用时,不会显示控件中的图像

更新时间:2023-12-06 16:06:52

使用此

 <   div    样式  ="  <  /div  >  



〜"是网站文件夹的根.


hi
in UserControl This Code Use:

<div style="width:200px;height:200px; background-color:Yellow; background-image:url(../Images/grafic.gif)" >
</div>




when Use this UserControl In Pages Image in UserControl Not Disaly!???
directory of usercontrol and Page is diffrent

Use this

<div style="width:200px;height:200px; background-color:Yellow; background-image:url(~/Images/grafic.gif)">
</div>



''~'' refers to the root of website folder.