Posts Tagged ‘ASP.NET’
.NET - Wednesday, October 31, 2007 1:18 - 0 Comments
ASP.NET Ajax PageMethods
If you haven’t yet used Page Methods then you’re really missing out. These allow you to create in-page web service methods that can then be called from the client.
This is a quick tip about where these methods can be embedded. It took me awhile to figure out why my newly added methods would not appear in the client javascript. I was using ASCX (user controls) and had the code in the user control code behind file. This will not work and the required javascript won’t ever get generated.
Page Methods must always be defined in the aspx.cs file!
-c