|
|
 Rank: Aficionado
Joined: 7/19/2006 Posts: 190 Location: Norway
|
Looks like the new liveEditing feature breaks the possibilities to have forms with html posted back on the frontend.
As for what I can trace (using Reflector) toggling the liveEditing feature is the only way to post html content now.. but this again is not an option for public users.. ;)
Anyone?
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 982 Location: Nyborg, Denmark
|
there's a public property on the default.aspx page that you can programmatically set. Can't remember it ATM but it should be pretty obvious. So in a user control cast the Page object to the type of the umbraco default.aspx and you can set it to false programmatically which I'd much better as you only turn off validation when you need it :-)
Jeeeez, did I really start this :-)
|
|
 Rank: Aficionado
Joined: 7/19/2006 Posts: 190 Location: Norway
|
Thanks, testet that but no go. Umbraco somehow triggers PageLoad in default.aspx before the UserControls (macro) Init method - so, ValidateRequest is set to false too late. Umbraco have already triggered ASP.NETs ValidateRequest..
|
|
 Rank: Aficionado
Joined: 7/19/2006 Posts: 190 Location: Norway
|
To test, I've created a new Macro with a UserControl that's placed all the way on top in the master template The UserControl has only one thing in it: Code: protected void Page_Init(object sender, EventArgs e) { ((umbraco.UmbracoDefault)this.Page).ValidateRequest = false;
}
Attached two breakpoints - one on Init in the UserControl and one in UmbracoDefault (/default.aspx) on Page_Load Code: protected void Page_Load(object sender, EventArgs e) {
if (ValidateRequest) Request.ValidateInput(); ...
I'm attaching the debugger to the asp.net process and load the page.. the page_load event on the page triggers before the page_init on the UserControl - making it impossible to set the ValidateRequest to false before umbraco uses the variable and triggers ASP.NETs request validation..
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 982 Location: Nyborg, Denmark
|
Bugger - thanks for bringing this up! Could you add it as an issue in the tracker...
Jeeeez, did I really start this :-)
|
|
 Rank: Aficionado
Joined: 7/19/2006 Posts: 190 Location: Norway
|
|
|
 Rank: Addict
Joined: 3/17/2008 Posts: 982 Location: Nyborg, Denmark
|
Just tried to reproduce and it worked fine and as expected. No bugs and validation is turned off :)
Jeeeez, did I really start this :-)
|
|
|
Guest |