My First Ajax Program part 1

1

Written on 8:49 PM by Mj blog

My First Ajax Program being a web developer i was always eager to see whats new in web 2.0 but for past 6 months i have not touched web was working in sql clr u all might have seen in the previous post so lets start with my first AJAX program in ASP.net 2.0.

Lets kick start ...

Pre requisties

Let the game begain : May be the force with (say in starwars style)

open visual studio now create new website or file --> new --> website

choose ASP.NET AJAX-Enabled website

looks like this



Give the file path and project name and it will create a new website. open the default.aspx page.
open the tool box now you will find a new tab Ajax extension in the tool box


click the scriptmanager and drag & drop or double click it and put in the design view the source view look like this


and then drap the updatepanel to the design view

Now place any control with postback eg: button, gridview etc inside the updatepanel







in the the codebehind Default.aspx.cs


protected void Button1_Click(object sender, EventArgs e)
{

Label1.Text ="hello World";
}

compile the website and press F5 or Ctrl F5 to run the application

click the button and you will notice the page is not refreshing but label text only changes

This is the first AJAX program.


If you enjoyed this post Subscribe to our feed

1 Comment

  1. Anonymous |

    Interesting to know.

     

Post a Comment