Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 537689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:57:12+00:00 2026-05-13T09:57:12+00:00

Before rendering into a view model should be formatted: multilingual data localized; date, time

  • 0

Before rendering into a view model should be formatted:

  1. multilingual data localized;
  2. date, time values formatted;
  3. numbers formatted.

Who performs all this formatting – Controller or View?

Am I right that all the formatting is performed by the Controller which creates so called ViewModel containing only formatted values and sends this ViewModel to the View?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:57:13+00:00Added an answer on May 13, 2026 at 9:57 am

    Eric Petroelje is right, but I would build helper a class(es) to get localised content/dates etc, because localisation isn’t always in the views, e.g. sending emails with localised content. I would have something like LocalisationHelper.GetString(“MyKey”), or LocalisationHelper.GetDate(Date.Now), where the LocalisationHelper knows the users current locale (maybe from Session).

    Then use this directly in the views where possible:

    <%= Html.Encode(LocalisationHelper.GetDate(Date.Now)) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to add value to this form.content before rendering class myform(forms.Form): title = forms.CharField(max_length
I am calling a function in a backing bean, but before rendering jsf page,
I intend to implement Martin Fowler's Two-Step View Pattern for rendering HTML in a
I'm running into an issue with Opera not rendering my HTML5 site properly. The
I have a question. Recently I was looking into ways to implement hardware rendering
Currently I am trying to render a .obj model that I loaded into vectors.
Before I dive into the question. Let me state that by Event Loop I
I am looking for advice before getting too deep into my next project. I
This is just a quick question before I dive deeper into converting my current
before I start I want to point out that I tagged this question as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.