Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send data to a webservice in the background

Status
Not open for further replies.

stanfury

Instructor
Feb 7, 2006
3
GB
how can a send a string to a webservice i have created
i want to have a link on a page the sends data to the webservice? i dont want any other windows to pop up or anything like that.

 
a webservice is just a url. whether it's called from the code behind, or client side.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
ok so i am a bit of a newbie when it comes to webservices, which i should have said

for test purposes i have made a button, (although ideally i would like to have a link as this will fit into my css much better)

and i have

protected void Button1_Click1(object sender, EventArgs e)
{
Response.Redirect(" info");
}

in the code behind

when i click on it, it takes me to a different page though showing me the resultant xml, but i do not want to navigate away.

i know, i am miles away but it doesn't seem to be such a complex thing to want to do. i have searched around but i think i am using the wrong terminology in my searches
 
yes you redirected to the url and the response was xml so the browser displayed the xml. you need to consume the request. if you are calling the code from the client you can use ajax to call the service and parse the results. if you are calling from the code behind i think you need to reference the project and call the web service proxy.

I don't use webforms or asmx projects so I'm not sure of the details. with an MVC framework "services" are just another url. I make calls from the client with jquery.ajax and parse the return json object.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top