Thanks Mauricio Scheffer for your reply,yes i understood.
but in my case my problem is i need to get this value in my layout page
(default.vm),
then where can i placed the code PropertyBag["myKey"] =
ConfigurationManager.AppSettings["myKey"];
can i do it in Home controller(is it a  base controller?)?.




On Oct 12, 10:21 pm, Mauricio Scheffer <[email protected]>
wrote:
> IMHO you should keep nvelocity templates as dumb as possible.
> If you're using MonoRail, you can just do PropertyBag["myKey"] =
> ConfigurationManager.AppSettings["myKey"];
> If you're using plain stand-alone NVelocity, pass the value through
> the VelocityContext.
>
> On Oct 12, 1:34 pm, suneesh <[email protected]> wrote:
>
> > This must be a simple question.
>
> > My question is how to get the <appSettings> value: myValue in the
> > web.config:
>
> >   <appSettings>
> >     <add key="myKey" value="myValue" />
> >   </appSettings>
>
> >  in .vm  file similar to "<%$appSettings:myKey %>" in aspx file
>
> > I know in .cs we can get it from:
>
> > System.Configuration.ConfigurationManager.AppSettings["myKey"]
>
> > but don't know how in .vm.
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to