1
我試圖讓一把umbraco域在C#這樣的:一把umbraco - DocumentType場C#
(String.Format(Umbraco.Field("labelFailure").ToString(), username));
但我發現了以下錯誤:
Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end
request.
我不知道錯誤以及如何解決它。
謝謝!
您試圖訪問Umbraco.Field在自定義的C#代碼,而不是在一個視圖? – Eyescream
是的,我想製作一個ViewData。 –