Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to concatenate a variable

Hi all,

Little question:

I want to concatenate a variable to a string in an alert statement:
Dim ID As String = Request.Form("ID")
Dim scriptString As String = "<script language=JavaScript> {"
scriptString += "var jsID ='" & ID & "';"
scriptString += "alert('OK' + ID);"
scriptString += "}</"
scriptString += "script>"
I donot know how to write the variable ID in this statement, because I have troubles with the single and double quotes in it.

Help is appreciated, Ger.
[605 byte] By [GerEielts] at [2007-11-11 7:00:28]