This project is read-only.

Passing parameter to DataService

Nov 6, 2009 at 11:52 PM

In all the examples, the Webservice returns a datatable with all results during page load.  I have a bunch of filters that I need the user to choose, and then on a mouse button click, will I call the Web Service and passing it an ID or filters. 

1)  How do I pass to the web method TestData an ID?  Right now the format is:  DataService.TestData(onLoadSuccess);

2) When I call the Web method from a button click event, the grid will bind the data and then on postback, it will disappear.  How do I make it stay on postback?



Nov 7, 2009 at 3:53 PM

doh!! easier than I thought.  1)Modified the web method to take an argument and then DataService.TestData(x,onLoadSuccess); 2) and using an html button solved the post back problem.