I'm trying to extend the idea of loading a different template into a div with jQuery. This works for normal content and XSLT also works, but if I try it with a UserControl which contain webcontrols it doesn't work. It says it's missing the form tag and if I place the form tag in the ajax template the posting doesn't work. Posting with a button works, but the button posts to the ajax template instead of staying on the normal page. Is there a way to solve this or should I just not use UserControls in combination with this kind of ajax loading?
@FrederikCould: Could you explain how the VerifyRenderingInServerForm works and how I can set it to false? Is there a chance this works because in the situation a page is loaded inside a div. The page doesn't have a form tag, but the div in which is page is loaded does have a form tag.
I still didn't find a solution. Webcontrols don't work if the page is loaded with the jQuery load method. Buttons work but post to the ajax template (instead of staying on the current page) and when I just the linkbutton I get the following error:
theform.__eventtarget' is null or not an object
There should be a way to let webcontrols work with jQuery ajax.
Templates, jQuery and WebControls
Hello,
I'm trying to extend the idea of loading a different template into a div with jQuery. This works for normal content and XSLT also works, but if I try it with a UserControl which contain webcontrols it doesn't work. It says it's missing the form tag and if I place the form tag in the ajax template the posting doesn't work. Posting with a button works, but the button posts to the ajax template instead of staying on the normal page. Is there a way to solve this or should I just not use UserControls in combination with this kind of ajax loading?
Jeroen
Try setting VerifyRenderingInServerForm to false, which should bypass the check for the form tag with the runat="server" attribute.
@FrederikCould: Could you explain how the VerifyRenderingInServerForm works and how I can set it to false? Is there a chance this works because in the situation a page is loaded inside a div. The page doesn't have a form tag, but the div in which is page is loaded does have a form tag.
Jeroen
I still didn't find a solution. Webcontrols don't work if the page is loaded with the jQuery load method. Buttons work but post to the ajax template (instead of staying on the current page) and when I just the linkbutton I get the following error:
There should be a way to let webcontrols work with jQuery ajax.
I found the following topic: http://old.nabble.com/Button-doesn't-work-in-jquery-dialog-td21215723s27240.html. Is it possible to do this with Umbraco?
is working on a reply...