XForms

Vote:
 

Hi,

I am quite new to episerver world.I am trying to implement the Xforms .using the followinf link:

http://www.frederikvig.com/2009/12/part-6-creating-the-xform-page-create-an-episerver-site-from-scratch/

but in my XFormControl.ascx In the following line which have bold font,I countinously getting error "Cannot implecitly convert KnowledgeWeb.Template.Xform into episerver.Xforms.Xform. .

 

namespace knowledgeWeb.Templates
{
    public partial class XFormControl : EPiServer.UserControlBase
    {
        private XForm _form;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (this.Form == null)
            {
                return;
            }

            FormControl.FormDefinition = this.Form;
        }

 

#44131
Oct 01, 2010 12:07
Vote:
 

Quess you have declared a class called XForm, that always confuses the compilator.

#44134
Oct 01, 2010 12:42
Vote:
 

Hi! Have you also implemented the Form property from that guide? The thing is that it is perhaps not a wisely chosen name because the page template ancestor (System.Web.UI.Page) already defines a property called Form, but that property is the actual HtmlForm of the page. So I suggest you implement the property with a different name, say "FormDefinition" and change the call to this.FormDefinition.

Edit: Scracth that. Anders is right. Either change the name of your class or include the full namespace of the type of your _form field.

#44135
Edited, Oct 01, 2010 12:44
Vote:
 

Hi,

Thanks for the reply.I have changed  the name of class and the form shows up in my webpage.

#44137
Edited, Oct 01, 2010 13:29
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.