Sorry all, new to this. I want to create a brail ViewComponent to
handle compex Ajax based UI controls. As such, I need to pass
parameters to the ViewComponent and would like to use a View to render
the HTML portions of the control.
The issue I have is that I cannot (or don't know how to) pass any
information to the ViewComponent View. I've read several blogs and
tried those recommendations but to no avail. I'm stuck supporting .net
1.1 so I'm using RC2.
I set up the ViewComponent like this:
public class DateControlComponent : ViewComponent
{
public override void Initialize()
{
PropertyBag["Name"] = "Hello World!";
}
}
In the view component view, I try to access the parameter as such:
<% output name %> is the name of the control
but I get an exception saying that the Parameter "name" is not found.
I've tried putting it everywhere and in all combinations:
Context.ComponentParameters and Context.ContextVars in both the
Initialize and Render methods calling the default.boo view,
specifically named views, shared views, etc.
I think that ViewComponents are a very powerful concept but either (a)
I'm stupid, (b) they're too hard to use or have insufficient
documentation, or (c) they don't work. I generally defer to option (a)
and the root cause of most of my problems and I expect as much here -
can some one please set me straight?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---