SIGN UP MEMBER LOGIN:    
ARTICLE

ASP.Net AJAX GridView Loading using C#

Posted by Dinkar Chavhan Articles | AJAX in C# April 05, 2011
How to use ASP.Net AJAX GridView Loading using C#
Reader Level:


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.

Coding..

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

        System.Threading.Thread.Sleep(4000);

        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }

 

Login to add your contents and source code to this article
share this article :
post comment
 

Be Clear What you are trying to say..

Posted by mohan kumar Feb 29, 2012
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor