Hi,
this is working with the new version that is not yet released, please
check my blog or this Google group in the next days.
Example:
[AjaxPro.AjaxMethod]
public static AjaxPro.JavaScriptObject Test26()
{
AjaxPro.JavaScriptObject o = new AjaxPro.JavaScriptObject();
o.Add("firstName", new AjaxPro.JavaScriptString("Michael"));
o.Add("age", new AjaxPro.JavaScriptNumber(29));
o.Add("isMarried", new AjaxPro.JavaScriptBoolean(true));
return o;
}
What you can do, of course, is creating a DataTable on the fly...
Regards,
Michael
On 5/31/06, Moskie <[EMAIL PROTECTED]> wrote:
>
> Sorry to bump my own post...
>
> so am I not asking the right question?
>
> I'm just looking to return a Javascript object whose properties I
> create on the fly. In the example I provided, I want a Javascript
> object returned that looks something like this:
>
> { FirstName : "John",
> LastName : "Doe",
> EmployeeID : "123",
> NTLogin : "jdoe",
> Email : "[EMAIL PROTECTED]" }
>
> I feel it's overkill in my situation to have to create a serializable
> structure to contain that information, just for this one function. And
> making a specific SQL query that only contains the columns I want is
> overkill too, with how this project is designed. So creating the custom
> JS object seemed like the best solution... how do I do that?
>
>
> >
>
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---