javascript - pass multiple arguments __doPostBack -


is possible pass multiple arguments in __dopostback call? know how use 1 arrgument __dopostback('service', $("input[name=celservice]:checked").val());

and in code behind vb.net

if eventtarget = "service" 'something endif 

but how when use 2 arguments

we have created our own library pass data web page asp.net. without getting details, javascript code wraps info xml stream (you can use json well) parsed on server.

@ core, our javascript object looks this:

function myargs() {     var args = '';      this.add = function (id, value) {         args += ('<param id="' + encodeuri(id) + '" value="' + encodeuri(value) + '" />');     };      this.output = function () {         return '<request>' + args + '</request>';     }; } 

and use this:

var args = new myargs(); args.add("param1", "value a"); args.add("param2", "value b");  __dopostback("your_service", args.output()); 

we because quite comfortable xml data, may use json or url encoding. logic same: create stream can parse on server.

technique useful other way around, server client, response ajax requests.

hope may of :)


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -