Visual Basic (Declaration) | |
---|---|
Public Property Settings As Dictionary(Of String, String) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public Dictionary<string, string> Settings {get; set;} |
This method takes only strings values, however, any type can be specified. If a value of "true" is passed, it will be a boolean in JS.
To use a string with that value, use "'true'" with single quotes. The same applies to numbers.
If a JS variable that holds the value in JS must be referenced, prefix the string with "js:".
This will prevent quote wrapping and will be used in JS as is. For example, if in JS there is a variable defined as var colorRed = 'red';
to refer to this variable in a string setting server side, use "js:colorRed". This allows passing functions as well for cases like label callbacks.
For example: "js:function(txt){return 'text:'+txt}"