Aspose.Cells.GridWeb.Examples.CSharp.Miscellaneous.DataSourceControl.BindWithDataSourceControl.Page_Load C# (CSharp) Method

Page_Load() protected method

protected Page_Load ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected void Page_Load(object sender, EventArgs e)
        {
            // Sets the actual database path
            string path = (this.Master as Site).GetDataDir();
            path = path + "\\Miscellaneous\\Database\\Northwind.mdb";
            AccessDataSource1.DataFile = path;

            if (!IsPostBack && !GridWeb1.IsPostBack)
            {
                // Bind web worksheet object
                GridWeb1.WebWorksheets[0].DataBind();
            }
        }