?
Solved

Passing value into a string

Posted on 2013-05-14
2
Medium Priority
?
229 Views
Last Modified: 2013-05-14
Hi,

I have this code which works perfectly fine.

Dim imageString As String = String.Empty
  imageString = imageString & "<img src=""../Images/signicon.png/"""" alt="""" height=""20"" style=""filter:alpha(opacity=100);"" />&nbsp;&nbsp;"

But I would like to drop in a extra value (pathToImages) But I keep getting syntax error.

Dim pathToImages As String = ConfigurationManager.AppSettings("PathToImages")

 imageString = "<img src= " pathToImages & "/Images/pageicon.png/"""" alt="""" height=""20"" style=""filter:alpha(opacity=100);" />&nbsp;&nbsp;"

Would be grateful for any help.

Thanks
0
Comment
Question by:Soluga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39164156
Add in another ampersand before pathToImages:

imageString = "<img src= " & pathToImages & "/Images/pageicon.png/"""" alt="""" height=""20"" style=""filter:alpha(opacity=100);" />&nbsp;&nbsp;"

Open in new window

0
 
LVL 1

Author Closing Comment

by:Soluga
ID: 39164169
That's great.

Thanks
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question