capturing user actions on html elements for .NET backend

Hi;

I need to capture user actions on html elements so that I can use those for ASP.NET backend of my application.

One concern is that i don't want to check a postback in my ASP.NET web application. So, i need AJAX. Can someone provide me a sample program/(some lines of code for AJAX in front and for backend) that does this?

Br.
LVL 12
jazzIIIloveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MlandaTCommented:
With ASP.NET, you create some web services and consume those through AJAX. You have several options for creating this web services (ASMX, WCF, Web API + REST)

If you are using ASP.NET MVC then your most natural choice is to use Web API (these articles show the concepts involved):
http://www.codeproject.com/Articles/424461/Implementing-Consuming-ASP-NET-WEB-API-from-JQuery
http://www.c-sharpcorner.com/UploadFile/2b481f/calling-the-Asp-Net-web-api-with-jquery-and-javascript/
http://www.codeproject.com/Tips/678138/MVC-using-Web-API-and-JQuery-to-GET-or-POST-Data
http://encosia.com/using-jquery-to-post-frombody-parameters-to-web-api/

If you are using ASP.NET Web Forms, you would otherwise use ASMX web services or WCF, but the recommendation now is to use Web API anyways.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.