Réponse acceptée !
Bonjour
un tableau n'est pas une variable simple ... c'est normal que montab.tostring te renvoie System.String[] tu voulais qu'il te renvoie quoi ?
pour faire ca tu peux faire :
dim monTab(10) as string
dim sb as new stringBuilder
foreach s as string in monTab
sb.appendFormat("'{0},'", s.replace("/","//").replace("'","\'"))
next
dim result as string = String.Format("var lien = {{{0}}}", sb.toString())
page.clientScript.registerStartupScript(me.getType(), "lien", result)
Cyril -
MVS -
MCP ASP