i have the code for updating the record using primary key "wp_id" in my db i can update via textbox and drop down list as well if values are given correct
but the problem arises when i give wrong id that does not exists in db it still proceeds showing records updated although its not updated..
it should validate the textbox value with db first then show MSG accordingly...
so basically i need to perform checks before updating any record 1)check for empty textbox 2) check for wrong value entered in the textbox
if anyone has idea plzz respond ...
so far my code looks like:
protected void Button2_Click(object sender, EventArgs e)//update_click
{
Label1.Text = null;
int added=0;
string selectSQL = "UPDATE w_product set Category='" + TextBox3.Text.Trim() + "', Brand='" + TextBox4.Text.Trim() + "', Price='" + Convert.ToInt32(Te ...
Go to the complete details ...