1

Is it possible to have the Value field of the NAME-VALUE list as the RichText?

Our Requirement is to provide the HTML content in the Value field and render in the webpage as HTML.

1 Answer 1

2

Not really, no

While it may be possible to tweak some stuff around to make it seem like it works, I doubt it would really be a solution for you in the long run.

Internally, a Name Value Field stores its value as an UrlString. As such there are limitations to both length and actual content you can put in the field.

The raw value of Name Value List is stored in a url string format – value_1=20.5&value_2=21.5&value_3=22.5&value_4=23.5&value_5=24.5.

And in code, when reading the field value:

string _urlParamsToParse = item["NameValueListFieldName"];
NameValueCollection nameValueCollection = Sitecore.Web.WebUtil.ParseUrlParameters(_urlParamsToParse);

You should probably re-visit whatever requirement it is, you're pursuing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.