using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

 

using Utilities;

 

namespace GridViews

{

    public partial class GridViewExample1 : System.Web.UI.Page

    {

        DBConnect objDB = new DBConnect();

 

        protected void Page_Load(object sender, EventArgs e)

        {

            if (IsPostBack == false)    // if it's the first page load

            {

                String strSQL = "SELECT * FROM Product ORDER BY ProductNumber";

                gvProducts.DataSource = objDB.GetDataSet(strSQL);

                gvProducts.DataBind();

            }

        }

    }

}