When i am inputing digits more then 10 digits, then my page get crash
The conversion of the nvarchar value 12345678912 overflowed an int column.
so how to prevent ,page doest get crash
on below code.
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
balsearchno();
}
private void balsearchno()
{
String strQuery = "select Prdno From Probale where" +
" Prdno = @Prdno";
// SqlConnection con = new SqlConnection();
SqlCommand cmde = new SqlCommand();
cmde.Parameters.AddWithValue("@Prdno", TextBox1.Text);
cmde.CommandType = CommandType.Text;
cmde.CommandText = strQuery;
cmde.Connection = con;
try
{
con.Open();
SqlDataReader sdr = cmde.ExecuteReader();
while (sdr.Read())
{
//DropDownList1.SelectedValue = sdr[0].ToString();
txtbno.Text = sdr["Prdno"].ToString();
lbbal.Text = sdr["Prdno"].ToString();
}
}
catch (Exception ex)
{
throw ex;
}
con.Close();