how to get the individual parameters from the list of dynamic parameters in a webmethod,sent using
        Posted  
        
            by kranthi
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by kranthi
        
        
        
        Published on 2010-05-12T11:32:23Z
        Indexed on 
            2010/05/12
            15:34 UTC
        
        
        Read the original article
        Hit count: 268
        
hi, I am using jquery ajax method on my aspx page,which will invoke the webmethod in the code behind.Currently the webmethod takes a couple of parameters like firstname,lastname,address etc which I am passing from jquery ajax method using
data:JSON.stringify({fname:firstname,lname:lastname,city:city})
now my requirement has been changed such that,the number and type of parameters that are going to be passed is not fixed for ex.parameter combination can be something like fname,city or fname,city or city,lname or fname,lname,city or something else.So the webmethod should be such that it should accept any number parameters.I thought of using arrays to do so, as described here.
But I do not understand how can I identify which and how many parameters have been passed to the webmethod to insert/update the data to the DB.Please could someone help me with this?
thanks
© Stack Overflow or respective owner