PDA

View Full Version : نحوه استفاده از freetextbox



saniak_robot
یک شنبه 28 اسفند 1384, 11:43 صبح
با سلام
من می خوام از freetextbox تو پروژه ام استفاده کنم . این کار رو کردم ولی وقتی می خوام اطلاعات تو freetextbox رو با دستور response.write تو صفحه نشون بدم خطای زیر رو می گیره .
لطفا اگه کسی استفاده کرده بگه که چجوری ازش استفاده کنم .


با تشکر






A potentially dangerous Request.Form value was detected from the client (FreeTextBox1="<FONT face=Georgia c...").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (FreeTextBox1="<FONT face=Georgia c...").

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (FreeTextBox1="<FONT face=Georgia c...").]
System.Web.HttpRequest.ValidateString(String s, String valueName, String collectionName) +230
System.Web.HttpRequest.ValidateNameValueCollection (NameValueCollection nvc, String collectionName) +99
System.Web.HttpRequest.get_Form() +121
System.Web.UI.Page.GetCollectionBasedOnMethod() +70
System.Web.UI.Page.DeterminePostBackMode() +47
System.Web.UI.Page.ProcessRequestMain() +2106
System.Web.UI.Page.ProcessRequest() +218
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87

saniak_robot
یک شنبه 28 اسفند 1384, 12:01 عصر
آقا خودم فهمیدم . این هم کدش .
از مدیریت خواهشمندم این تاپیک و قفل کنن.






<%@ Page ValidateRequest="False" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<script language="VB" runat="server">
Sub btnSave_Click(sender as Object, e as EventArgs)
lblText.Text = FreeTextBox1.Text.Replace("<", "<")
lblHtmlStrippedText.Text = FreeTextBox1.HtmlStrippedText
End Sub
</script>

<form runat="server">
<FTB:FreeTextBox id="FreeTextBox1" runat="server" />
<br>
<asp:Button runat="server" id="btnSave" Text="Save" OnClick="btnSave_Click" />
<p>
<pre><asp:Label runat="server" id="lblText" /></pre>
<p>
<pre><asp:Label runat="server" id="lblHtmlStrippedText" /></pre>
</form>