here is my code
CODE
protected void Button6_Click(object sender, EventArgs e)
{
SqlConnection con2 = new SqlConnection(@"Data Source=DIVYA;Initial Catalog=divproject;Integrated Security=True");
SqlDataAdapter da2 = new SqlDataAdapter("select * from counter", con2);
DataSet ds2 = new DataSet();
da2.Fill(ds2, "counter");
if (ds2.Tables["counter"].Rows[0][0].ToString() != null)
{
TextBox1.Text = ds2.Tables["counter"].Rows[0][0].ToString();
TextBox2.Text = ds2.Tables["counter"].Rows[0][1].ToString();
TextBox3.Text = ds2.Tables["counter"].Rows[0][2].ToString();
TextBox1.Text = "";
TextBox3.Text = "";
Response.Write("Ur message has been sent successfully");
}
The above code is for saving message details in a table....
When i try to run the code,I'm getting the exceptions like
1."Indexoutofrange"
2."There is no row at position 0."
Whats the reason ,I'm getting these errors
plzzzzzzz help me if anyone know.........
As soon as possible
Thanx in advance