How do I a embed a variable css style in a VB.NET xml string literal?
I would like to add a variable data to a string literal WITHIN the HTML tag
Dim locationOfImage as string = "http://blahblah......"
Dim xmlString = _
<div style="background:url(" <%= locationOfImage %> ")">
<h3>Some text</h3>
</div>
The above does 开发者_JS百科not work, I can't quickly determine how to do this? Is this possible. I could achieve what I am attempting to do with a StringBuilder but want to use the xml literal if possible.
<div style="<%= String.Format("background:url('{0}')", locationOfImage) %>">
精彩评论