Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a problem adding a contour form from codebehind in a usercontrol. I've tried two different paths with no or little success.
The first path I went, was adding the form as a macro, like this
var mcr = new Macro();mcr.Alias = "umbracoContour.RenderForm";mcr.MacroAttributes.Add("FormGuid", item.GetProperty("form").Value);div.Controls.Add(mcr);
This doesn't give me anything - nothing renders.
The second way I went was adding the ascx file with loadcontrol, like this:
var ucForm =(Umbraco.Forms.UI.Usercontrols.RenderForm)LoadControl("~/usercontrols/umbracoContour/RenderForm.ascx");ucForm.FormGuid = item.GetProperty("form").Value;div.Controls.Add(ucForm);
This webt a little better. The form was actually rendered, but if I reload the page(F5), the fields was added once again.
On load is looks like this
On reload it looks like this
Can anybody help me out here?
Comment author was deleted
Hey Rasmus, what version of umbraco are you running this on?
As the title says - umbraco 4.0.2.1 and contour 1.1.9 :-)
I would assume that the second one is correct but seems there is an issue with the caching, could you try disabling the caching int he contour config file (found in the /umbraco/plugins/contour dir)
That did the trick. Thank you.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Contour form from codebehind (umb 4.0.2.1, Contour 1.1.9)
I have a problem adding a contour form from codebehind in a usercontrol. I've tried two different paths with no or little success.
The first path I went, was adding the form as a macro, like this
This doesn't give me anything - nothing renders.
The second way I went was adding the ascx file with loadcontrol, like this:
This webt a little better. The form was actually rendered, but if I reload the page(F5), the fields was added once again.
On load is looks like this
On reload it looks like this
Can anybody help me out here?
Comment author was deleted
Hey Rasmus, what version of umbraco are you running this on?
As the title says - umbraco 4.0.2.1 and contour 1.1.9 :-)
Comment author was deleted
I would assume that the second one is correct but seems there is an issue with the caching, could you try disabling the caching int he contour config file (found in the /umbraco/plugins/contour dir)
That did the trick. Thank you.
is working on a reply...