Can a Webmethod reference an ListView

J

John

I'm calling the Webmethod from JS and at the end of the function I would
like to do a a ListViewBillable.DataBind() in the Webmethod, calling a
postback from JS is not rendering the correct results.
How would I make a Reference to it as an Object to call the DataBind in the
Webmethod VB code?

Thanks
John
 
B

bruce barker

yes, but whats the point? a webmethod returns a string that the javascript
caller can use. databinding a control on the server only changes the control
tree in the request instance. it shoudl only be done if you need it to
determine the return value.


-- bruce (sqlwork.com)
 
J

John

Thanks for your reply, the issue I have is that I have an onload event on
the Listview ItemSepearator I use to access direct control over the
separator. On a Listview. DataBind the events fire alternating as you would
expect, 1st one ItemDataBound then a Separator event I am calling on the
onload event, etc until all are done.

When using JS DoPostBack thru the OnSuceeded function on the completed
Webmethod, they fire sequencally, 1st all the ItemDataBound events & then
all the Separator events; rendering different results.

The result I am after is the Item Separator only renders one time instead of
all the time, which does not occur thru JS PostBack.

I just wanted to try it, but cannot figure out the syntax to do it.
Thanks
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top