capturing user actions on html elements for .NET backend


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?

LVL 12
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

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):

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.

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

From novice to tech pro — start learning today.