Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
asp.net ハンドラーを使用して html 本文の背景画像を設定したいのですが、ハンドラーはありますが、私が言ったことを行う方法がわかりません。
ページ読み込みイベント ハンドラーなどのイベント ハンドラーを意味すると仮定すると、次のことができます。
body タグを次のように変更します。
<body runat="server" id="BodyTag">
コードビハインドで、これを行います (C#):
BodyTag.Style["background-image"] = "MyImage.png";
または (VB.NET)
BodyTag.Style("background-image") = "MyImage.png"