public void btnSearch_Click(object sender, EventArgs e) { string strCustNo = txtCustomer.Text; if (strCustNo != "") { int strCnt = 0; bool textIsNumeric = true; try { int.Parse(strCustNo); } catch { textIsNumeric = false; } if (!textIsNumeric) { ScriptManager.RegisterClientScriptBlock(txtCustomer, txtCustomer.GetType(), "Customer", "LoadCustomerLookup('" + Server.UrlEncode(PFC.Intranet.Securitylayer.Cryptor.Encrypt(strCustNo)) + "','" + txtCustomer.ClientID + "');", true); } else { GetSearch(); customerDetails.ReleaseLock(); customerDetails.SetLock(hidCustomerID.Value.Trim()); } } }