Click here to Skip to main content
15,888,320 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi Friends

I Want to change the Model statue message like

The value 'adg' is not valid for CagrRate1.


I have added the Globel resource file
and add the line in globel file

which is

C#
protected void Application_Start()
       {
           AreaRegistration.RegisterAllAreas();
          DefaultModelBinder.ResourceClassKey = "ModelErrorMessages";//this is for the customize error messages
           RegisterGlobalFilters(GlobalFilters.Filters);
           RegisterRoutes(RouteTable.Routes);
       }


but how to do this for the individual property of model

Please Help me

Thanks
Posted
Updated 18-Dec-12 3:32am
v3

1 solution

I actually found this very useful post from Prasad_Kulkarni

You can find it here: how to display messages in asp.net using C# language?[^]

Kudos to Prasad_Kulkarni
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900