My First Ajax Program part 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
- offcourse .net 2.0 frame work installed in ur pc(sounds stupid na he he )
- visual web developer express edition or visual studio 2005 std, team suite etc ... as usual
- Ajax for asp.net (previously ATLAS as usual lots of codename by microsoft), download from this link http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
- Install it and enjoy ...
- As of now i have not downloaded AJAX control kit ok lets discuss abt it later
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.
Interesting to know.