Do you use .aspx forms with ASP.Net and JavaScript code with ArcGIS API or only JavaScript?
I normally use just HTML and JavaScript. For any code that needs to run server side I usually create a Generic Handler (.ashx) that returns JSON and call it from the JavaScript code.