开发者

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)  %>">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜