我想在 asp.net 中的文本框上使用 javascript 对文本框的 textchange 事件进行这种类型的验证,下面是我在 c#validtaion 中的代码:
string str = "Select ReceiptNo from BranchOutwardItems where ReceiptNo='" + txtReceiptNo.Text + "'";
DataTable dt = objGlobalClass.LoadData(str);
if (dt.Rows.Count > 0)
{
lblMsg.Text = " Receipt ID already exists.Click On ADD for Generate New Receipt ID";
}
else
{
lblMsg.Text = "Receipt ID doesnot exists";
}