[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Passing value into a string

Posted on 2013-05-14
2
Medium Priority
?
232 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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.
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

868 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