Hi,
In the load event of a web user control I have the following code which I am using to call a function in order to populate a HTML Text Area.
The page hosting the control loads fine the first time it loads but on postback it throws the error
I have seen people suggest <%@ Page ... validateRequest="false" %>System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client
Firstly I would like to handle this at control level rather than on the hosting page and secondly is it not somehow possible to just somehow encode the problem string so this error is never raised in the firstplace?
Code:if (!Page.ClientScript.IsStartupScriptRegistered("AddText")) { Page.ClientScript.RegisterStartupScript (this.GetType(), "AddText", "AddText('txtAreaOutline', '" + aOutline1.Overview + "');", true); }





Reply With Quote