Using The Code
Download the source code , unzip it and configure it in your IIS. The folder "Ajax_CSharp.Net" contains a sub-folder named "DB Table". This sub-folder contains a sql file. Execute the sql in your local sql server. A table with the name "employee" will be created. Add some more data into the table with the insert query in the sql file.
Execute the project Ajax_CSharp.net. Click the button. The button is a html button.It takes employee data from the table 'employee' without page post-back and populate the data in the dropdownlist. When a particular record is selected in the dropdownlist, the selected employee name and employee id willl be displayed in the label.
What is Ajax?
Ajax is used to eliminate round-trip to the server, when a request is posted to the server. In simple, we can say that when we want to access the database without page refresh, we can use Ajax.
protected void Page_Load(object sender, EventArgs e)
public string GetData()