Posted on: 7/23/2012 5:58:08 AM | Views : 276

when i try to check my grid is working or not i am getting error at
GridView.DataSource = dt1;
            GridView.DataBind();
"Error is An object reference is required for non static field variable."
The code is as follows.
 protected void Button1_Click1(object sender, EventArgs e)
        {
            string s = ConfigurationManager.ConnectionString"].ConnectionString;
            OdbcConnection cn = new OdbcConnection(s);
            cn.Open();
            OdbcCommand cm1 = new OdbcCommand("select * from NewCampaign where date between '" + TextBox1.Text + "' and TextBox2.Tex ...

Go to the complete details ...