Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on 

c# from web form to xml request and response

I have simple asp.net webpage with contact form. So when a button is clicked, it want to generate xml

String firstname = FirstName.Text,

String xmlstring = “<xml><person><firstname>” + firstname + “</firstname></person></xml>”;

And then, want to take the xml string, and do a post method soap request to the server.abc.com.

And then, I should get response from the server.abc.com

How can I get start it using c#/asp.net?

Thanks
ASP.NETC#XML

Avatar of undefined
Last Comment
ITsolutionWizard
ASKER CERTIFIED SOLUTION
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of ITsolutionWizard

ASKER

Hope to have some samples codes to read in aspx net c#
Honestly, you will find loads of code samples should just google in separate parts (asp.net capture form data example, C# xml serialisation example, c# soap request example, etc.) All of these are independent of each other hence separate searches.

However, happy to help if you could share whatever you already have.

Still would insist to do it yourself as that would help you best.
Avatar of ITsolutionWizard

ASKER

I can't find any good working samples on google. Let me know if you have any good sources so I can start from there
In addition, if you have a wsdl of the web-service, just include a web-reference in your project and call a method as if the that method is in your C# project. Adding web-reference generate all the code required to make a soap request. Virtually NO CODE is required in this approach, but you almost no control over soap envelop.
Avatar of ITsolutionWizard

ASKER

Actually, I look for something that work with request and response xml in common. I only want to see response status is successful or not.
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo