Solved

Passing value into a string

Posted on 2013-05-14
2
228 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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