Hi,
Can anyone help me in how to bind values to the datalist with in web method.
thanks
Hi,
That may not be possible. WebMethod or PageMethod are used to inform server or get data only
but not to create asp.net control or update it.
What u can do is, call WebMethod get DataSet and fill DataList at serverside itself.
http://www.aspdotnet-suresh.com/2011/05/aspnet-web-service-or-creating-and.html
or fill it by Ajax,
Yes as raju has explained that web-methods are kind of Web-API calls and only service raw data not the server-side control binding etc. So, instead use jQuery based data control along with your web-methods.
Thanks
沒有留言:
張貼留言