Zame
Zame

Reputation: 320

Script in ASP to VB

Given this line of a Javascript function in ASP :

App.Hidden1.setValue(
  Ext.encode(App.GridPanel1.getRowsValues({ selectedOnly: false }))
)

I have no idea how to convert that to VB. Any ideas?

Upvotes: 0

Views: 71

Answers (1)

Sean Airey
Sean Airey

Reputation: 6372

Ext.encode is a function in the Ext JS library (http://docs.sencha.com/extjs/4.1.3/#!/api/Ext-method-encode) that encodes a value into a JSON string. To replace this you can use the JavaScriptSerializer in System.Web.Script.Serialization, which can be used like so:

Dim serializer as New JavaScriptSerializer()
Dim arrayJson as String = serializer.Serialize(myArray)

Upvotes: 2

Related Questions