Wednesday, March 12, 2014

How to cast base class into derived class by JavaScriptSerializer

                BaseClass b = new BaseClass(){};
                System.Web.Script.Serialization.JavaScriptSerializer ser = new System.Web.Script.Serialization.JavaScriptSerializer();
                var json = ser.Serialize(b);
                DerivedClass d = ser.Deserialize(json);

How many data binding context variables in Knockout?

http://knockoutjs.com/documentation/binding-context.html
$parent
$parents
$root
$data
$index (only available within foreach bindings)
$parentContext
$context
$element

How to bind array of string in Knockout?

$data
Example