Skip to main content

For the rendering parameters, I have a droplist which consists of the friendly name of the CSS-classCSS-class which further consists of a value field for the actual CSS-classCSS-class. In

In my view when I try to retrieve the rendering parameter, I am always getting a friendly name and not the actual value.:

var parameter = RenderingContext.Current.Rendering.Parameters["Background"];

var parameter = RenderingContext.Current.Rendering.Parameters["Background"];

<div class="@parameter">
</div>

For the rendering parameters, I have a droplist which consists of the friendly name of the CSS-class which further consists of a value field for the actual CSS-class. In my view when I try to retrieve the rendering parameter, I am always getting a friendly name and not the actual value.

var parameter = RenderingContext.Current.Rendering.Parameters["Background"];

For the rendering parameters, I have a droplist which consists of the friendly name of the CSS-class which further consists of a value field for the actual CSS-class.

In my view when I try to retrieve the rendering parameter, I am always getting a friendly name and not the actual value:

var parameter = RenderingContext.Current.Rendering.Parameters["Background"];

<div class="@parameter">
</div>
Source Link
robocup
  • 23
  • 2
  • 6

Get inner value of the rendering parameter

For the rendering parameters, I have a droplist which consists of the friendly name of the CSS-class which further consists of a value field for the actual CSS-class. In my view when I try to retrieve the rendering parameter, I am always getting a friendly name and not the actual value.

var parameter = RenderingContext.Current.Rendering.Parameters["Background"];