I'm trying to get something to work and I'm wondering if this is possible? Basically, I have a control that wraps the contour render control, and does some extra checks. I want it to pass the contour user control a property that is set on the parent user control.
I've tried setting the macro parameter with DataBinding, and I've tried setting it on the code behind, but n both cases it comes out as empty and doesn't pick up the form value. I CAN get it to work by loading the control in the code behind, and setting the macro parameter and then adding that to the user controls controls collection. HOWEVER, that breaks one of the custom field types that the form uses that I have no source for.
Bind Render Form Macro at Runtime
Hiya,
I'm trying to get something to work and I'm wondering if this is possible? Basically, I have a control that wraps the contour render control, and does some extra checks. I want it to pass the contour user control a property that is set on the parent user control.
I've tried setting the macro parameter with DataBinding, and I've tried setting it on the code behind, but n both cases it comes out as empty and doesn't pick up the form value. I CAN get it to work by loading the control in the code behind, and setting the macro parameter and then adding that to the user controls controls collection. HOWEVER, that breaks one of the custom field types that the form uses that I have no source for.
Is this actually possible with Contour?
Comment author was deleted
Yeah it should, basicly do the same with the Contour preview
On init I simply add the usercontrol
RenderForm control = (RenderForm)new UserControl().LoadControl("~/usercontrols/umbracoContour/RenderForm.ascx");
control.AllowEditing = true;
control.FormGuid = f.Id.ToString();
PlaceHolder1.Controls.Add(control);
Maybe if you do it this way and not with the macro you have more luck...
Tim, you're a star :) that worked! Thanks for the pointer!
is working on a reply...