Can a Webmethod reference an ListView

Discussion in 'ASP .Net' started by John, Jun 24, 2008.

  1. John

    John Guest

    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
     
    John, Jun 24, 2008
    #1
    1. Advertising

  2. John

    bruce barker Guest

    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)


    "John" wrote:

    > 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
    >
    >
    >
     
    bruce barker, Jun 24, 2008
    #2
    1. Advertising

  3. John

    John Guest

    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

    "bruce barker" <> wrote in message
    news:...
    > 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)
    >
    >
    > "John" wrote:
    >
    >> 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
    >>
    >>
    >>
     
    John, Jun 25, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin
    Replies:
    4
    Views:
    24,527
    shivakalluri
    Apr 10, 2008
  2. omer013

    How can i redirect from a webmethod?

    omer013, Jan 21, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    11,900
  3. .
    Replies:
    0
    Views:
    735
  4. Ryan Bingham

    Can't return class instance from WebMethod

    Ryan Bingham, Aug 11, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    113
    Ryan Bingham
    Aug 11, 2003
  5. DaberElay
    Replies:
    0
    Views:
    131
    DaberElay
    Oct 5, 2004
Loading...

Share This Page