c# - logical error while comparing "-" with any record existing into the table -
what trying compare "-" in textbox record in table , code is:
string cusph = txt_phone.text; tbl_custumer findcustumer = _objdb.tbl_custumer.where(obj => obj.cus_ph == cusph).firstordefault(); if (findcustumer != null) { strcusid = findcustumer.cus_id.tostring().trimend(); response.write("<script language='javascript'>alert('custumer registered ')</script> "); }
the problem when want compare (obj.cus_ph == cusph) when value of cusph "-", if condition becomes true , should not happen.
Comments
Post a Comment