ASP.Net AJAX GridView Loading using C#

Step 1: Take Script Manager first.

Step 2: Then take UpdateProgress Ajax Control (you can take load images...)

Step 3: Take UpdatePanel Control; in that take Gridview, button ok

Now double click on Button and Load Data the Data.

You have to create a method to bind the data to the Button.

You have to write code as shown below.


   protected void Button1_Click(object sender, EventArgs e)
    protected void BindData()
        SqlConnection cn = new SqlConnection("Data Source=SHASHI-PC;Initial Catalog=shashi;User ID=sa;word=omsairam");
        // SqlCommand cmd = new SqlCommand("select * from emp", cn);
        SqlDataAdapter da = new SqlDataAdapter("select * from emp", cn);
        DataSet ds = new DataSet();


        GridView1.DataSource = ds.Tables[0];


Similar Articles