开发者

Validation for a unique property

Does anyone know how to do validation for a unique property or can point me to an example?

Say I have a grid of movies and I do an edit or an insert. If I set the textbox 'Title' to be 'A really cool movie'. How would I do the validation to ensure the database doesn't already contain a movie by this title? Would I use a CustomValidator? I tried doing this but when I was checking the text in the textbox it was coming through as an empty st开发者_JS百科ring.

Thanks!

Mr Cricket


Yes, this is a perfect scenario for a Custom Validator. However, unless you are using AJAX, they only validate when a post-back occurs. Without knowing more about your exact setup, this is all I can provide.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜