To start with ajax in asp.net lets gain some idea from their official site first.
One can download the entire AjaxControlToolkit and start implementing with updatepanel, you can easily get lots of updates panel example on google.
So I would like to start from next step.
One way to have ajax implementation in your application is using "WebMethod", Its very easy and quick approach. take look at the example
 | Ajax call with WebMethod, get server time |
| using System.Web.Services;
| | 1:
| | 2:namespace Arindam.AjaxWebMethod
| | 3:{
| | 4: public class WebMethodExample
| | 5: {
| | 6:
| | 7: [System.Web.Services.WebMethod]
| | 8: protected static string GetServerTime()
| | 9: {
| | 10: return DateTime.Now.ToLongTimeString();
| | 11: }
| | 12: }
| | 13:}
| | 14: |
|
 | Server side method call from javascript |
| //Set EnablePageMethods=true in ScriptManager
| | 1:
| | 2:<asp:ScriptManager runat="server" ID="scm3" EnablePageMethods="true" >
| | 3: </asp:ScriptManager>
| | 4:
| | 5:<script language="javascript" type="text/javascript" >
| | 6:
| | 7:function getServerTime()
| | 8:{
| | 9: var time= PageMethods.GetServerTime(onSucced,onFailed);
| | 10: alert (time);
| | 11:}
| | 12:
| | 13:function onSucced(result,UserContext,Methodname)
| | 14:{
| | 15:
| | 16:}
| | 17:function onFailed(result,UserContext,Methodname)
| | 18:{
| | 19:
| | 20:}
| | 21:
| | 22:</script>
| | 23: |
|