Warning on duplicate

In ASPM23Where or how would I set up a warning if a there is a duplicate field.
I have already setup for the field to check if it’s a duplicate.I want a pop up warning or any type of warning that tells the user why the record cannot be inserted.Thanks

Just to note I have tried all the default options that are currently in server events

Use the Form_CustomValidate server event.

I’ve tried using this, but now I realize even my message showing does not work… no popup message.I’ve inspected no errors and I’ve checked all browser settings…Is there a setting in ASPNM that should be checked for msg showing.
Validation is on server and client side.Why would it not show?
Thanks

You can post your code for discussion.

I am using this standard. I have a field that is selected to check duplicate.
When I enter a duplicate it just stays on the page and goes no further, no message. I need a warming message to say this is a duplicate entry.
My field name is .// Message Showing event
// type = “”|“success”|“failure”|“warning”
public void Message_Showing(ref string msg, string type) {
// Note: Do not change msg outside the following 4 cases.
if (type == “success”) {
msg = “your success message”;
} else if (type == “failure”) {
msg = “your failure message”;
} else if (type == “warning”) {
msg = “your warning message”;
} else {
msg = “your message”;
}
}

Show your codes for the Form_CustomValidate server event as well.