Class ViewExtensions
Contains extension methods for the RazorPageBase class to retrieve culture and language information from the current ViewContext.
Inheritance
object
ViewExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DataWeb.Mvc
Assembly: DataWeb.Core.dll
Syntax
public static class ViewExtensions
Methods
GetCulture(RazorPageBase)
Returns the culture value from the current ViewContext of the specified page
.
Declaration
public static string GetCulture(this RazorPageBase page)
Parameters
Type | Name | Description |
---|---|---|
RazorPageBase | page | The RazorPageBase instance. |
Returns
Type | Description |
---|---|
string | The culture value as a string. |
GetLanguage(RazorPageBase)
Returns the language value from the current ViewContext of the specified page
.
Declaration
public static string GetLanguage(this RazorPageBase page)
Parameters
Type | Name | Description |
---|---|---|
RazorPageBase | page | The .RazorPageBase instance. |
Returns
Type | Description |
---|---|
string | The language value as a string. |