Archive for the ‘The Client Side’ Category

Creating a Page method (ScriptMethod) within an ASCX user control using AJAX, JSON, base classes and reflection (2009-11-3)

While ASCX user controls may not contain page methods (ScriptMethod), pages can. Duh, right! So why can’t I create a single, general page method in my base page class which all of my site pages inherit from, and provide a means, through reflection and custom attributes, along with my base user control class that all my ASCX user controls ultimately inherit from, to dynamically create JavaScript wrappers for calling my page’s single page method, which in turn knows how to invoke my user control type’s public static method, passing in any collection of parameters and even providing a wrapper for JSON serialization of the method’s result back to the client, INCLUDING ANONYMOUS TYPES!!! OK, now I’m on to something.

3-State CheckBox using Microsoft AJAX (2008-10-30)

Preview
Blank (or unset): , Checked (or granted): , and unchecked (or denied): .
I recently had some very difficult requirements to fulfill on an access control and configuration application with a web front end. Those of you who have designed or implemented access control interfaces know this is a daunting task, especially when the access control [...]

Creating a JavaScript HashTable (2008-5-2)

I use a lot of configuration and provider driven services and variables for developing web applications. Let’s face it, I don’t like to recompile. I recently had the need to share my Web.config settings with the client code, but didn’t want to declare a variable for every possible setting, I just wanted to dynamically create [...]

Shrinking JavaScript Arrays (2008-4-11)

Recently I’ve found myself writing a ton of client code in a new pure JavaScript/WCF project I am working on. Since most of the programming I’m doing for the UI is in JavaScript files, I’ve found myself having to work with the Array object for many different things. The one thing I’ve noticed however, is [...]