I've been stuck on this problem for a few hours now.
I need to save the value of a textbox on a form on ASPX Child Page which may contain html markup. The page also contains multiple Formviews bound to different datasources.
When I try and submit I get a "potentially dangerous request" error. I tried setting ValidateRequest="false" in the page header, but to no avail.
I assume the answer would be to strip the tags from the value before posting back to the server in javascript, but I cannot figure out a way to make the form perform a submit operation. I tried the page.submit() ; but it did nothing. And when I tried using the form control I get a javascript error stating submit is not a function.
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
...
<
asp:FormView
ID
=
"TwoWeekForm"
runat
=
"server"
DataSourceID
=
"TwoWeekDataSource"
DataKeyNames
=
"ID"
>
<
ItemTemplate
>
...
</
ItemTemplate
>
<
EditItemTemplate
>
...
<
asp:TextBox
ID
=
"TwoWeekText"
runat
=
"server"
Text='<%# Bind("Extended") %>' TextMode="MultiLine" CssClass="KeyEvent" style="color:Black"></
asp:TextBox
>
...
</
table
>
</
EditItemTemplate
>
...
</
asp:FormView
>
<
telerik:OpenAccessDataSource
ID
=
"TwoWeekDataSource"
runat
=
"server"
EnableDelete
=
"False"
EnableInsert
=
"False"
ObjectContextProvider
=
"CNTracker.OpenAccess.EntitiesModel, CNTracker.OpenAccess"
TypeName
=
"CNTracker.OpenAccess.Interaction"
Where
=
"this.Project == @Project AND this.Type == 17"
>
<
WhereParameters
>
<
asp:SessionParameter
DefaultValue
=
"1"
Name
=
"Project"
SessionField
=
"CurrentProject"
/>
</
WhereParameters
>
</
telerik:OpenAccessDataSource
>