This is the error I get when I put the Eval function, it won't work if I put the "=" sign either.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 76: <form id="umbMasterForm" runat="server">
Line 77: <h2>
Line 78: <asp:LoginStatus ID="RescueLoginStatus" LoginText="<%#Eval(umbraco.library.GetDictionaryItem("LoginText") %>" runat="server" /> Line 79: </h2>
Line 80: <asp:ContentPlaceHolder ID="cp_content" runat="server"></asp:ContentPlaceHolder>
putting dictionary items in server tags
Hi
Is there a way to put a dictionary item in server tags? ex:
Where "LoginText" is the dictionary items of course. I have tried to put it in
but I got an error
Hi Moran
What kind of error do you get? What does it say?
Perhaps you can find some tips on how to do this by reading this blogpost by Tim Geyssens? http://www.nibble.be/?p=14
/Jan
Hi Jan
This is the error I get when I put the Eval function, it won't work if I put the "=" sign either.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 76: <form id="umbMasterForm" runat="server"> Line 77: <h2> Line 78: <asp:LoginStatus ID="RescueLoginStatus" LoginText="<%#Eval(umbraco.library.GetDictionaryItem("LoginText") %>" runat="server" /> Line 79: </h2> Line 80: <asp:ContentPlaceHolder ID="cp_content" runat="server"></asp:ContentPlaceHolder>
any answer on this? do I need to provide more information?
Thanks/
it just won't work this way.. Better solution is to declare public properties (or functions) in your codebehind to fetch dictionary items eg.
Cheers,
/Dirk
Moran,
There was a blog post for expression builder for umbraco see http://our.umbraco.org/forum/developers/api-questions/5407-Macro-parameters-from-codebehind 4th post by Murray. The link to the post is dead im afraid however the other link http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx is live so you could do something similar.
Regards
Ismail
Thanks Dirk :) this looks like a good way to implament. and thank you Ismail too.
is working on a reply...