Populating HTML body background value from the database
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 */ %>">
精彩评论