|
|
Rank: Devotee
Joined: 10/25/2007 Posts: 52
|
Hi everybody I seem to experience an error when trying to pass a dictionary item into a Macro wrapping a .Net control. the following is the code I use in the template: Code:<?UMBRACO_GETITEM field="BodyText"/> <?ASPNET_FORM> <?UMBRACO_MACRO macroAlias="RequestForm" HeaderBooking="[#FormHeaderBooking]" HeaderTo="[#FormHeaderTo]" HeaderName="[#FormHeaderName]" HeaderAddress="[#FormHeaderAddress]" HeaderPhone="[#FormHeaderPhone]" HeaderMail="[#FormHeaderMail]" HeaderRequest="[#FormHeaderRequest]" HeaderComments="[#FormHeaderComments]" SubmitText="[#SubmitText]" RedirectId="1074" RequestMailAddress="[#FormRequestMailAddress]" RequestMailSubject="[#FormRequestMailSubject]" RequestMailToAddress="[#FormRequestMailToAddress]" WrongDateFormat="[#FormWrongDateFormat]" WrongMailFormat="[#FormWrongMailFormat]" WrongLastDate="[#FormWrongLastDate]"></?UMBRACO_MACRO> </?ASPNET_FORM> Can you see if I'm doing anythin wrong? Of course I have created the corresponding dictionary items, and I'm using umbraco 3.03 :o) Thanks in advance. Kind regards, Kim Løwert
|
|
Rank: Devotee
Joined: 10/25/2007 Posts: 52
|
Oh, I forgot to say that my problem is, that the .Net control is only passed the [#Form...] string in stead of the actual dictionary item.
Am I doing anything wrong???
/Kim
|
|
 Rank: Addict
Joined: 2/19/2007 Posts: 584 Location: Belgium
|
Hey Kim, Instead of passing the dictionary items you can acces the dictionary directly from your .net usercontrol. I'll post some code in a minute. Cheers, Tim
Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
|
|
 Rank: Addict
Joined: 2/19/2007 Posts: 584 Location: Belgium
|
After referencing the right library ( I think it is umbraco.dll ) You can do this: Code:
using umbraco;
.
.
.
litName.Text = umbraco.library.GetDictionaryItem("frmCompeteTitleName");
Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
|
|
Rank: Devotee
Joined: 10/25/2007 Posts: 52
|
Of course... Thanks ;o)
And of course it automatically returns the correct string based on the current language, right???
/Kim
|
|
|
Guest |