This is something i found that is really cool. I Always like to find the coding to do things and i found one for the GridView.

static string theConnectionString = ConfigurationManager.ConnectionStrings["MyConnectionStringSql"].ToString();
        protected void Page_Load(object sender, EventArgs e)
        private void BindGridView()
            SqlConnection m_objConnection = new SqlConnection(theConnectionString);
            SqlCommand sqlCommand = new SqlCommand("select * from Customers", m_objConnection);
            SqlDataReader reader = sqlCommand.ExecuteReader();
            GridView1.DataSource = reader;

        private void UpdateOrAddNewRecord(string ID, string Company, string Name, string Title, string Address, string Country, bool isUpdate)
        SqlConnection connection = new SqlConnection(theConnectionString);
        string sqlStatement = string.Empty;
        if (!isUpdate)
            sqlStatement =