ページの読み込み時に URL がバインドされていない背景画像を持つ div があります。URL はコード ビハインドの get メソッドで設定されます。ここで何が間違っているのかわかりません。
HTML:
<div class="decorator" style="background: transparent url(<%# HeadlineBackgroundImagePath %>) top center no-repeat; height: <%# HeadlineBackgroundImageHeight %>px;">
背後にあるコード:
protected string HeadlineBackgroundImagePath
{
get
{
return ($CompanyContext.Entity as IPPCUpdateEntity).HeadlineBackground.ShortSrc;
}
}
protected int? HeadlineBackgroundImageHeight
{
get
{
return ($CompanyContext.Entity as IPPCUpdateEntity).HeadlineBackground.Height;
}
}
ページが読み込まれると、次のようなものが表示されます (URL に何も含まれていないことに注意してください)。
<div class="decorator" style="background: transparent url() top center no-repeat; height: px;">
デバッガーに入り、プロパティにブレークポイントを設定しましたが、サイトはプロパティを呼び出しません。