You are here: RainWorx.FrameWorx.MVC Namespaces > RainWorx.FrameWorx.MVC.Helpers > ResourceExtensions Class > ResourceOrDefault Method

ResourceExtensionsResourceOrDefault Method

AuctionWorx 3.5 API
Retrieves a resource string based on the specified expression, or null if the key does not exist, converted to an MvcHtmlString

Namespace:  RainWorx.FrameWorx.MVC.Helpers
Assembly:  RainWorx.FrameWorx.MVC (in RainWorx.FrameWorx.MVC.dll) Version: 3.5

Syntax

C#
public static MvcHtmlString ResourceOrDefault(
	this HtmlHelper htmlHelper,
	string expression,
	params Object[] args
)

Parameters

htmlHelper
Type: HtmlHelper
an instance of the HtmlHelper class
expression
Type: SystemString
a string value which specifies the resource to retrieve
args
Type: SystemObject
optional arguments that will be dynamically inserted into the resoure retrieved if applicable

Return Value

Type: MvcHtmlString

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference

Copyright © 2002-2022. RainWorx Software. All rights reserved.