开发者

Populating HTML body background value from the database

开发者 https://www.devze.com 2023-03-29 16:02 出处:网络
How would I go about populating a database value to my html body background ? Simply put, the HTML code is something like:

How would I go about populating a database value to my html body background ?

Simply put, the HTML code is something like:

<body background="<%=session("userLogo")%>">  

Update Clarification of my question: Where in the code-behind, should I make the database call to populate th开发者_如何学编程e session("userLogo") value ?


Use this in your aspx:

body { background-image: url(<%= session("userLogo") %>); }

You can also put this in a css file (but then it has be an embedded resource and do remember to do performSubstitution = true)


Use <%= %>

<body background="<%= /* Code to retrieve value */ %>">
0

精彩评论

暂无评论...
验证码 换一张
取 消