Web Service in ASP.NET and JS

Hi


I want to create a web service in ASP.NET with a function that has an input and output. This WS should be consumed by JavaScript.

I'm looking for a working sample of such code.

Been looking around but nothing seems to work for now

Thanks


Share Send to a friend Watch Report
 
 

Posted Answers

 
1 helpful answer

not sure what you mean by "a function that has an input and output" your question is sort of vague.. hard to tell what you're asking about.

maybe you want the javascript to make an async call to your asp script?

you basically write three pieces of code. 

1. javascript function that gets the data from your page and makes an ajax call to asp... 

2. asp page that handles the javascript call 

3. a  callback function ( #1 includes reference to  this piece) that handles the response from piece #2 and updates your page accordingly

here's an example google turned up: http://www.15seconds.com/issue/050526.htm

 

Posted 2006-12-01T21:17:16Z
wilfordbrimley was invited by Yedda to answer this question.

Helpful?(2)
Rated as Best Answer

Sign in to participate

Got an answer for hanoch? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Explore Related Questions

Other people asked questions on similar topics, check out the answers they received:


Q:

Tree View ASP.Net 2.0

How to use Tree View in ASP.net 2.0
Submitted by leemus   2 years ago.
  • viewed 1768 times
Last answer posted 2 years ago by profitbob


Q:

Who uses asp.net

is there any major site that uses asp.net or asp.net 2.0? i mean someone like yahoo,ebay,google, digg, anyone...?
Submitted by navotvolk   3 years ago.
  • viewed 1353 times
Last answer posted 3 months ago by Shreeram


Q:

Saving data in the client side (using asp.net hidden fileds)

I'm programing in asp.net. When my page gets to the server side, I'm saving data in the client side (using asp.net hidden fields ...
Submitted by beytz   2 years ago.
  • viewed 2910 times
Last answer posted 1 year ago by Jacob



» More...

Explore Related Posts in Forums

Xampp and asp.net 2.0 and Ajax

Are there any plans for adding asp.net 2.0 and ajax support for xampp. . I all ready run a web site w/ Apache 2.2.6 and ASP.NET 2.0, it just doesn't support Ajax that Xampp would support ASP.NET 2.0 and Ajax. You CAN use Ajax. You CANNOT use ASP.NETQuote...

What to use: Callback, AjAX or simple Javascript in Asp.net app.

Refreshed. I am using ASP.net 2.0 and currently have no AJAx library installed. I looked at CallBack... in Asp.net and inclined to use it as it seems the easiest in this case. EDIT: perhaps I should also would used Ajax to do the save, and then use javascript to refresh the page. I don't understand why

Can you do ajax without using ASP.net ajax toolkit?

Can you do ajax on ASP.net webform without using ajax toolkit? (Please post a example link) -back-to-server#86520 This can perform much better than ASP.NET ajax, but does take longer to code . Certainly you can! What I did in .NET 1.1 (before ASP.Net Ajax was released) was to define
» More...
Powered by
Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
ADVERTISEMENT
AOL Autos Q&A is powered by Yedda an AOL Company
Copyright © 2006-2009, Yedda Inc. and respective copyright owners