Send form with werbservice?

2 posts, 0 answers
  1. chrispo
    chrispo avatar
    10 posts
    Member since:
    Jan 2010

    Posted 20 Mar 2010 Link to this post

    I have a button on a page and an xmlhttppanel that encloses an asp:Literal. Users click the button and a webservice is invoked that returns 3 comboboxes and another button into the Literal.

    My intention is that the users may select items in the comboboxes, click the button, the webservice is invoked again and I am able to inspect any of the controls within the form of the page within the webservice. I want to repeat this several times, each time returning a different combination of comboboxes, radiobuttons and other html elements.  

    My motivation is I do not want to post the entire page back, I want to update the Literal only. Because my html will change each time, its difficult to write a single javascript function to collect all values of html controls on the page and submit them to the web service.

    Is there a way to access the page form from the webservice using xmlhttppanel? If not, is there a better approach?
  2. Pero
    Pero avatar
    1156 posts

    Posted 24 Mar 2010 Link to this post

    Hello Chrispo,

    You could use either of the following ways:
    • Create a UserControl that has the controls you want to load inside the XmlHttpPanel, and use the RadXmlHttpPanel.RenderView(UserControlPath) static method to load the UserControl inside the XmlHttpPanel through web service.
    • Handle the XmlHttpPanel's ServiceRequest server-side event, and load the respective web controls you need to load.

    For your convenience, I have created a sample project that implements the first approach to load controls inside the panel. The project is attached to the thread.

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top