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
post comment
     

It's really a marvelous article about this test. Their coding is really very hard and so important to have a great experience. http://www.dapfor.com/en/net-suite/net-grid/features/data-source-binding

Posted by kianu rieves Sep 19, 2012

its nice

Posted by kianu rieves Sep 19, 2012

great one.

Posted by kianu rieves Sep 19, 2012

a good one.

Posted by kianu rieves Sep 19, 2012

Be Clear What you are trying to say..

Posted by mohan kumar Feb 29, 2012
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts