 Rank: Devotee
Joined: 2/28/2008 Posts: 67 Location: South Africa
|
Hi all
i have a user control that has a very basic html editor in it. When I try and submit the content I get the standard "potentially unsafe request" error. The answer to this is to set ValidateRequest="false" in your page or web.config. I definitely do not want to do it in my web.config, and cannot do it in my page as I am using a user control.
Any ideas how to somehow programatically set this (or any other way for that matter). I read this is an issue for v4, but I am using v3
Thanks in advance Andrew
|
 Rank: Newbie
Joined: 12/22/2008 Posts: 4 Location: Arizona
|
I found this works for me... Code: protected void Page_Init(object sender, EventArgs e) { ((umbraco.UmbracoDefault)this.Page).ValidateRequest = false;
}
http://www.morrisonconsutling-llc.com
|
Rank: Newbie
Joined: 1/28/2009 Posts: 1 Location: Denmark
|
Im using v3, and want to set ValidateRequest = false on a single page, but just for that single page, rather than the entire website.
There is no UmbracoDefault class in my v3 umbraco-namespace. Thus the above code example does not work (my dell version is 1.0.3050.25839). Short of setting ValidateRequest to false in the web.config (which would effect my entire site) I cannot find a solution.
Can any of you?
|
Rank: Aficionado
Joined: 12/11/2006 Posts: 128 Location: Denmark
|
In v4 it is also possible to do this in the templates section by adding this to the page: <script runat="server"> protected void Page_Init(object sender, EventArgs e) { ((umbraco.UmbracoDefault)this.Page).ValidateRequest = false; } </script>
/Jan Follow me on twitter
|