Hi,
I'm new to that subject in ASP .NET, however I had experience in PHP - where whole idea was preety straightfowrad: create page like something.php which returns pure JSON, and call it using $.post (for instance).
Now , in ASP, I walked into another approach (using Web Services + ScriptService attribute + MS library for proxy generation). I realy don't find it useful as I keep my hands in jquery for a long time and I'm not keen on learning yet another javascript framework library...
Bottom line: what it the best approach (less code, fastest) of creating AJAX calls using jquery to ASP .NET application hosted in IIS. For the time being, I've been creating empty pages (like CheckSession.aspx), with all code in Page_Load. Method wrote response using Response.Write and then ended it using Response.End. What bothers me, is:
- as ASP .NET isn't lightweight, I'm concerned about performance of this solution (all page life cycle etc...). Perhaps there is an easier/faster way to do it?
- that I still have codebehind cs file + aspx file (I would like to have one file, less code, less files, less hassle).
- in Response.Write as a parameter I put just a manually concatenated string. What if I would like to use objects and serialize it like Response.Write(obj.toJSON()) - is it possible?
I would appreciate some guidelines, links.
Thanks, Paweł