Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 3
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 3
This is the forum to discuss the Wrox book Professional ASP.NET MVC 3 by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen; ISBN: 978-1-1180-7658-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 8th, 2011, 10:55 PM
Registered User
 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 - Error messages and localization

Hi guys,

The DataAnnotations attributes appear to only localizable messages if they come from a resource file compiled into the web application.

We use a custom resource provider ( setup from the system.web/globalization configuration element ) so we can have consistent messaging across all our applications, so we don't have to recompile for every typo and allow us to add new languages in 1 go.

Is this possible, if not, then how do I accomplish this ?
  #2 (permalink)  
Old August 9th, 2011, 05:34 PM
Wrox Author
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

The DataAnnotations attributes are not tied to ASP.NET, so they have no knowledge of (and cannot participate in) the specialized ASP.NET resource system. You must use a traditional embedded string resource (with the auto-generated class wrapper) with DataAnnotations attributes.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 9 - Sending E-mail Messages demac3 BOOK: Beginning ASP.NET 4 : in C# and VB 4 November 4th, 2010 03:39 PM
chapter 9:Creating Email messages pg310 the3musketeer BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 January 21st, 2009 02:29 AM
chapter 03 ..i am getting error messages realiest BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 July 17th, 2006 03:01 PM
chapter 03 ..i am getting error messages realiest BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 7th, 2006 08:17 AM
Multipart messages in Chapter 10 gclarkson BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 8th, 2006 06:27 AM



All times are GMT -4. The time now is 07:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.