This is a migrated thread and some comments may be shown as answers.

Send form with werbservice?

1 Answer 63 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
chrispo
Top achievements
Rank 1
chrispo asked on 20 Mar 2010, 10:16 AM
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?

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 24 Mar 2010, 01:22 PM
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,
Pero
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.
Tags
XmlHttpPanel
Asked by
chrispo
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or