How to access global resources in a view using asp.net mvc razor

前端 未结 3 992
青春惊慌失措
青春惊慌失措 2021-02-07 03:31

Using ASP.NET MVC Razor, I have a resource file in App_GlobalResources named General.resx and General.fr.resx with a name value pairings o

3条回答
  •  庸人自扰
    2021-02-07 04:21

    To access value from resoure file in view

    Add this name space

    @using System
    

    Then display the value like this

    @ResourceFile.Address  (ResouceFile is the name of the ResouceFile)
    

    This method is used when evironment culture thread is used.

提交回复
热议问题