This example shows the use of a cso-native type from the Native Type Library of the CSO Gateway. A Dictionary<(Of <(TKey, TValue>)>) constructed with String for the keys and DateTime for the values is sent in the Object Gateway. The cso-native-type used to handled a Dictionary<(Of <(TKey, TValue>)>) is CsoGateway.Collections.Dictionary.

CopyASPX file
<form id="form1" runat="server">
    <div>
        <cso:ObjectGateway ID="objectGateway1" VariableNameOnClientSide="myFriendsBirthday" runat="server" />
    </div>
</form>
<%
CopyCodebehind file
protected void Page_Load(object sender, EventArgs e)
{
    Dictionary<String, DateTime> birthdayDict = new Dictionary<String, DateTime>();

    birthdayDict.Add("Sean", new DateTime(1982,3,14));
    birthdayDict.Add("Ben", new DateTime(1974, 12, 26));
    birthdayDict.Add("Jerry", new DateTime(1934, 9, 4));

    objectGateway1.SourceObject = birthdayDict;
}
CopyResult in browser
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
    Learn by examples #6
</title>
<script type="text/javascript" src="csogateway.axd?import=MicrosoftAjax.js"></script>
<script type="text/javascript" src="csogateway.axd?import=CsoGatewayGlobalFunctions.js"></script>
<script type="text/javascript" src="csogateway.axd?import=CsoGateway.System.js"></script>
<script type="text/javascript" src="csogateway.axd?import=CsoGateway.Collections.Hashing.js"></script>
<script type="text/javascript" src="csogateway.axd?import=CsoGateway.Collections.Dictionary.js"></script>

</head>
<body>

    <form name="form1" method="post" action="Example6.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTczMjkxMjkxMGQYAgUOb2JqZWN0R2F0ZXdheTEPBYIBbmV3IENzb0dhdGV3YXkuQ29sbGVjdGlvbnMuRGljdGlvbmFyeSgnU2VhbicsbmV3IERhdGUoMzg0OTMwMDAwMDAwKSwnQmVuJyxuZXcgRGF0ZSgxNTcyNjYwMDAwMDApLCdKZXJyeScsbmV3IERhdG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XRld2F5LlJlZmxlY3Rpb24uRGVwZW5kZW5jeUdyYXBoK0Rlc2NyaXB0b3JUeXBlAgAAAAIAAAAF8////0NjYS5tZXRhb2JqZWN0cy5jc29nYXRld2F5LlJlZmxlY3Rpb24uRGVwZW5kZW5jeUdyYXBoK0Rlc2NyaXB0b3JUeXBlAQAAAAd2YWx1ZV9fAAICAAAAAAYOAAAAJENzb0dhdGV3YXkuQ29sbGVjdGlvbnMuRGljdGlvbmFyeS5qcwEIAAAABwAAAAHx////8////wAGEAAAABRDc29HYXRld2F5LlN5c3RlbS5qcwEJAAAABwAAAAHv////8////wAGEgAAACFDc29HYXRld2F5LkNvbGxlY3Rpb25zLkhhc2hpbmcuanMFCgAAAEVjYS5tZXRhb2JqZWN0cy5jc29nYXRld2F5LlJlZmxlY3Rpb24uRGVwZW5kZW5jeUdyYXBoK1NjcmlwdERlcGVuZGVuY3kCAAAABXN0YXJ0A2VuZAQERWNhLm1ldGFvYmplY3RzLmNzb2dhdGV3YXkuUmVmbGVjdGlvbi5EZXBlbmRlbmN5R3JhcGgrU2NyaXB0RGVzY3JpcHRvcgIAAABFY2EubWV0YW9iamVjdHMuY3NvZ2F0ZXdheS5SZWZsZWN0aW9uLkRlcGVuZGVuY3lHcmFwaCtTY3JpcHREZXNjcmlwdG9yAgAAAAIAAAAJBwAAAAkIAAAAAQsAAAAKAAAACQkAAAAJCAAAAAEMAAAACgAAAAkHAAAACQkAAAALZC6kTtjubJcsFW4exwW0fgIargFn" />
</div>

        <div>
            <script type="text/javascript">var myFriendsBirthday = new CsoGateway.Collections.Dictionary('Sean',new Date(384930000000),'Ben',new Date(157266000000),'Jerry',new Date(-1114804800000));</script>
        </div>
    </form>


</body>
</html>