Duplicate value & custom message

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
hk_agserna
User
Posts: 13

Duplicate value & custom message

Post by hk_agserna »

Hello, using asp.netmk 10 (vb.net)
Need to set custom message on check duplicate values, i mean different messages for different fields, not only lang.xml value.
Any help?
thanks for support.


kirondedshem
User
Posts: 642

Post by kirondedshem »

You can customise the phrase in any server event in language load like below

//set the duplicate indicator
SetPhrase("dupindex","A '%f' called '%v' already exists");

But the customisation you want per field is not yet supported since i think they all use the global phrase for all fields.

If you want it customised to that level I suggest you manually add your code in row_inserting to check each duplicate value ad return desired specific error message


hk_agserna
User
Posts: 13

Post by hk_agserna »

thks, can't find any "language load" event....
Could you clarify please?


kirondedshem
User
Posts: 642

Post by kirondedshem »

you dont have to use language load, you can event put it in page_load of your add/edit pages or in global page load event.

BUt as i said that still sets it globally, you need to add checks in row_inserting for a more custom one


hk_agserna
User
Posts: 13

Post by hk_agserna »

Got it!!
Thks


Post Reply