Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with generated JScript code...
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Web forms
Title:
Problems with generated JScript code...
Miscellaneous
Thread ID:
00876400
Message ID:
00876400
Views:
50
I need to generate a call for onChange of some controls generated in server-side. The code is (in the ASPX vb.net page):


lcFuncion = "return MostrarValorCombo(this," + lcControlCombo + ",'" + oControl.Tabla + "','" + oControl.CampoCodigo + "','" + oControl.CampoDescripcion + "'," + lcValidar + ");"

If oControl.EditBox.Attributes.Item("onChange") <> "" Then
oControl.EditBox.Attributes.Item("onChange") = oControl.EditBox.Attributes.Item("onChange") + "&&" + lcFuncion
Else
oControl.EditBox.Attributes.Add("onChange", lcFuncion)
End If

So, in html, the code MUST look this way:

,true)&& return Asignar

But is generated this way:

,true);&&return Asignar

I don't put the ; or & and that cause to fail the script..

How avoid it???
The Life is Beautiful!

Programmer in
Delphi, VS.NET
MCP
Next
Reply
Map
View

Click here to load this message in the networking platform