[CLOSED] AjaxMethods: System.Guid as parameter not working

  1. #1

    [CLOSED] AjaxMethods: System.Guid as parameter not working

    Hi,
    not sure if this is a bug or a feature request:
    when I call an ajaxmethod witch takes as first parameter a Guid value, it gets treated as a number causing an exception.
    Is Guid supported?
    I currently have a workaround in place using string in the method signature and converting to Guid internally in the method.

    thx,
    Peter
  2. #2

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    I have been using a text field to house the guid and it seems to work fine. There is no specific guid field type.
  3. #3

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    Hi Peter,

    Can you post a simplified .aspx code sample demonstrating the full scenario? Is the GUID the a defined param type in the AjaxMethod? or is the Method expecting a string or int? More information (ie code) is required.


    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    Ok, here comes an example. aspx plus code behind files are attached, simply edit the country name and click on Save.
    thx
    peter
  5. #5

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    Did you already have time to take a quick look at my sample code?
    maybe I am doing sth wrong?

    Peter

  6. #6

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    Hi,

    Fixed. Please update from SVN.

    Just for information... If you need to use complex objects as AjaxMethod's argument you need encode it

    [AjaxMethod]
    public void UpdateCountry(Guid id, Country c, int[] arr)
    {
    }
    
    Coolite.AjaxMethods.UpdateCountry(
        rec.get('ID'), 
        Ext.encode({ID: rec.get('ID'), ShortCode: 'code', Name: 'name'}), 
        Ext.encode([4,3,2,1])
    );
  7. #7

    RE: [CLOSED] AjaxMethods: System.Guid as parameter not working

    Thx,
    I'll give it a try.
    br
    Peter

Similar Threads

  1. Replies: 2
    Last Post: Oct 25, 2013, 4:38 PM
  2. [CLOSED] Unsupported type: System.Guid (Migration from 0.8.3 to 1.0)
    By vedagopal2004 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 07, 2011, 8:16 AM
  3. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  4. Replies: 3
    Last Post: Oct 18, 2009, 7:03 AM
  5. Replies: 2
    Last Post: Aug 31, 2009, 6:03 PM

Posting Permissions