Do you have the option to simply add another "string" property onto the ViewModel ? Like another property called "RegistrationText" or maybe "DicRegistrationText" or similar? If so you should be able to get it easy on the Model object.
It's a common MVC strategy to try and get the calls like "Umbraco.GetDictionaryValue" into the Controllers so you keep the Views nice and clean MVC-wise with only simple types, usually this means you can jump into where the ViewModel is created and set this value there.
If you're not sure where this is done in the solution, try and search for whereever in the solution it says "new [NameOfViewModel]", hopefully that's only one place :)
on the render form action, but again nothing is returned.
I thought using the Umbraco helper here would have taken care of it.
It's not one of these weird v8 things is it?
EDIT
just noticed that if I place a breakpoint below the line where I try to set testTxt and hover over 'Umbraco', I see this:
'Umbraco.AssignedContentItem' threw an exception of type 'System.InvalidOperationException'
I have faced same problem. When i have uploaded dlls into bin folder at that time below error occur on the server. i need to upload again DictionaryService services class .
I am facing this issue as and when and just by excluding the web.config file and reuploading the DLL files again on the server the issue gets resolved.
Can anyone help me to understand why this issue is taking place and what is the solutions?
access dictionary values in partial view with inherited model
I have a partial view where the model is inherited from a ViewModel instead on IPublishedContent.
How then can I access Umbraco dictionary values in the partial? If inheriting from IPublishedContent the I just do this obviously
I'm unsure how to do this when not inheriting from IPublishedContent.
thanks
Hi Damion !
Do you have the option to simply add another "string" property onto the ViewModel ? Like another property called "RegistrationText" or maybe "DicRegistrationText" or similar? If so you should be able to get it easy on the Model object.
It's a common MVC strategy to try and get the calls like "Umbraco.GetDictionaryValue" into the Controllers so you keep the Views nice and clean MVC-wise with only simple types, usually this means you can jump into where the ViewModel is created and set this value there.
If you're not sure where this is done in the solution, try and search for whereever in the solution it says "new [NameOfViewModel]", hopefully that's only one place :)
Hi,
Yes I tried that, I have a test string on the ViewModel and tried to set it as
on the render form action, but again nothing is returned. I thought using the Umbraco helper here would have taken care of it. It's not one of these weird v8 things is it?
EDIT
just noticed that if I place a breakpoint below the line where I try to set testTxt and hover over 'Umbraco', I see this:
Hi Damion,
You can write your own DictionaryService to access it and registers as singleton.
In your Partial View, now you can do to get the value based on culture:-
Nice Shaishav, I'll give that a try
Although it was good to be able to debug through the code in the service it still returned nothing. Not sure where to go with this now : (
I have faced same problem. When i have uploaded dlls into bin folder at that time below error occur on the server. i need to upload again DictionaryService services class .
Hello Experts,
Priority: URGENT.
I am facing this issue as and when and just by excluding the web.config file and reuploading the DLL files again on the server the issue gets resolved.
Can anyone help me to understand why this issue is taking place and what is the solutions?
is working on a reply...