Hai Techie
When i try to execute following code it shows an error called
Code:
string updatesql = "update Stu_Detailstable set St_Second ='" + AmountpaidText.Text + "' , St_sinsbillno='" + BillnoText.Text + "' , SIpaiddate='" + PaidonText.Text + "',Chequeno='" + CheqnoTextBox.Text + "'where St_phone= '" + SearchcontactnoText.Text + "'";
SqlCommand command = new SqlCommand(updatesql, con);
FinSqldataSource.UpdateCommand = updatesql;
FinSqldataSource.Update();
con.Open();
int result =command.ExecuteNonQuery();
if (result == 1)
{
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Transaction Sucessfull ');", true);
}
else
{
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Transaction Sucessfull');", true);
}
Invalid operationException was unhandled by user code
The connection was not closed. The connection's current state is open. What does it means ?