I'm still a little confused on how I pass Enums into a function.
for example:  here is my enum

public enum MyEnum
{
  One = 0,
  Two = 1,
  Three = 2
}

My function "Server Side":
public string GetSomeValues(MyEnum e) {...}

---------------------

My question comes in the JavaScript, when I use the
AjaxPro.Utility.RegisterEnumForAjax(MyEnum) I get the following
JavaScript:

addNamespace("Mypage")
MyPage.MyEnum = { "One":0,"Two":1,"Three":2 }

How do I pass this enum in my JavaScript?
I know I can do something like GetSomeValue(MyPage.MyEnum.Two,
callback);

But this puts a burdon on everything else.  I have drop downs and
select boxes throught my HTML that have the numeric values:

Select One: <select><option value="0">One</options><option
value="1">Two</option>.....</select>

My question is how can I do something like:

GetSomeValue(MyPage.MyEnum[1], callback);

I hope this makes sense.....the jist of it is I want to pass numeric
values around...
Any pointers will be greatly appreciated.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to