Configuration

Todo: Be more detailed :)

Quick setup:

Reference Awesome.ClientID to your Web Application.

Modify your web.config to include the HTTPModule:

<add name="PageSerializer" type="Awesome.ClientID.PageSerializerModule, Awesome.ClientID"/>

Usege:

Pages will have two Json arrays written to the HTML doc. 'controls' and 'properties'.

To access the ClientID of your control, simply type:

controls.txtUserName

This will corospond to the ClientID of the control, 'ctl00ContentPlaceHolder1txtUserName'

For use in JavaScript you can now type:

var usernameTextBox = document.getElementByID(controls.txtUserName);

Properties:

To serialize properties in your page or usercontrol, add the attribute to the property 'CanSerializeProperty'.

Now you can access properties in the same way you access controls.

If you had a property called FullName, you can access it like:

properties.FullName

Last edited Jan 6, 2011 at 11:52 AM by NaturalCause, version 3

Comments

No comments yet.