Beispiel #1
0
        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IDefault page)
        {
            // Initialize MyApplet1
            var a = new OutRun4KTemplate_Components_MyApplet1();

            a.AttachAppletTo(page.Content);

            //var btn = new IHTMLButton("get the damn string");

            //btn.AttachToDocument();

            //btn.onclick +=
            //    delegate
            //    {
            //        Native.Window.alert(a.FooMethodX());
            //    };

            @"Hello world".ToDocumentTitle();
            // Send data from JavaScript to the server tier
            service.WebMethod2(
                @"A string from JavaScript.",
                value => value.ToDocumentTitle()
                );
        }
        /// <summary>
        /// This is a javascript application.
        /// </summary>
        /// <param name="page">HTML document rendered by the web server which can now be enhanced.</param>
        public Application(IDefault page)
        {
            // Initialize MyApplet1
            var a = new OutRun4KTemplate_Components_MyApplet1();

            a.AttachAppletTo(page.Content);

            //var btn = new IHTMLButton("get the damn string");

            //btn.AttachToDocument();

            //btn.onclick +=
            //    delegate
            //    {
            //        Native.Window.alert(a.FooMethodX());
            //    };

            @"Hello world".ToDocumentTitle();
            // Send data from JavaScript to the server tier
            service.WebMethod2(
                @"A string from JavaScript.",
                value => value.ToDocumentTitle()
            );
        }