0

Look this what i have

string imagePath = "http://" & ConfigurationManager.AppSettings("DomainName") & "/images/"
htmlstring = <tr style='border-width: 0px; height: 36px; background-image: url(' " & imagePath & " cart_top_centbg.jpg');'>

here imagePath is set in web.config file but this is not geting loaded in that css style background-image, m i doin' something wrong here ?

3
  • 1
    I don't think that this is a css problem, as such. What language are you composing the htmlstring in? Commented Oct 1, 2010 at 7:32
  • @David Thomar: yeah this is not a css problem,but how to compose that backround image is the problem and its in C sharp Commented Oct 1, 2010 at 7:37
  • Thanks, @FosterZ, you might benefit from adding that to your tags for the question. Commented Oct 1, 2010 at 7:39

1 Answer 1

1

The above code appears to be VB syntax? If you are in C#, you would need:

string imagePath = @"http://" + ConfigurationManager.AppSettings["DomainName"] + "/images/";

string htmlstring = "<tr style='border-width: 0px; height: 36px; background-image: url('" + imagePath + "cart_top_centbg.jpg');'>";
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.