Can a Webmethod reference an ListView

  • Thread starter Thread starter John
  • Start date Start date
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
 
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)
 
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
 
Back
Top