string CS = ConfigurationManager.ConnectionStrings["SampleConnectionString"].ConnectionString; SqlDataAdapter da; Dataset ds; DataRow Rec; SqlCommandBuilder bldr; protected void Button1_Click(object sender, EventArgs e) { try { Rec = ds.Tables[0].NewRow();//here when i writing the ds.Tables[] here iam getting the red curling lines with above mentioned error. Rec[0] = TextBox1.Text; Rec[1] = TextBox2.Text; Rec[2] = TextBox3.Text; Rec[3] = TextBox4.Text; Rec[4] = TextBox5.Text; ds.Tables[0].Rows.Add(Rec); Console.WriteLine("Record Inserted"); } catch (Exception ex) { Console.WriteLine(ex); }
DataSet
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)