CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • how to read the validation message from resource file

    rated by 0 users
    Not Answered This post has 0 verified answers | 1 Reply | 1 Follower

    Not Ranked
    15 Posts
    wasiuddin.786 posted on Thu, Mar 10 2011 11:58 PM

    how to read the validation message from resource file

    i have two two project fro business model

     

    1)Model.Client

    2)Model.Server

     

    so how to add the resource file to server and how to add the link to client side

    please give me steps so i can read the validation massage from resource file

     

    it will should work client and serverside validation

     

    All Replies

    Top 500 Contributor
    19 Posts
    Matt replied on Fri, Mar 11 2011 9:47 AM

    We use a resource file called RulesMessages under a resources folder in our server model project and then add it as a linked file in the client Model project. 

    Then in the business rules we use the following to access it in the business rule.

    var message = string.Format(Resources.RulesMessages.SomeMessage, PrimaryProperty.FriendlyName);
    context.AddInformationResult(PrimaryProperty, message);
    
    
    Page 1 of 1 (2 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems