I'm trying to submit form data as an XML string through an API instead of the usual <form action="http://www.mysite.com" method="post">.
The API takes in an XML string as a parameter, like: <Data><firstnamex>Hello</firstnamex><lastnamex>World</lastnamex></Data>.
The old way in Web Forms I would do this was
String dataXml = "<Data>";
dataXml += "<firstnamex>" + firstnamex.Text + "</firstnamex>";
dataXml += "<lastnamex>" + lastnamex.Text + "</lastnamex>";
dataXml += "</Data>";
and then
mainApi.Service1 ws = new mainApi.Service1();
string retVal = ws.InsertRecord(dataXml);
Since I can't just grab the firstnamex.Text control like I could in Web Forms, how would I do this?