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

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -