Solved

Passing value into a string

Posted on 2013-05-14
2
223 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
2 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now