hi when i try to post this textbox text , i got this error.
“Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500”
my page:
<%@ Page Title="" Language="C#" MasterPageFile="~/Yonetim/Yonetim.Master" AutoEventWireup="true"
CodeBehind="ImzaDetay.aspx.cs" Inherits="Yonetim.Detay" ValidateRequest="false" EnableEventValidation="false"%>
my textbox:
<asp:TextBox ID="txt_SQL_STR" TextMode="MultiLine" runat="server" Width="100%"
Height="1000px" />
i try this :
<%@ Page ValidateRequest="false" %>
but i got same error.
It works for me :
CREATE TABLE EMPLOYEE3 AS
(SELECT PROJNO, PROJNAME, DEPTNO
FROM EMPLOYEE
WHERE DEPTNO = 'D11') WITH NO DATA
It makes me crazy !! :
SELECT
DATED,
decode(dated,TRUNC(SYSDATE),'<div style="color: red;">') || to_char(t.dated,'dd.mm.yyyy') || decode(dated,TRUNC(SYSDATE),'</div') DATED2,
to_char(t.dated,'dd.mm.yyyy') DATED3,
WEEK_NO week_no,
decode(dated,TRUNC(SYSDATE),'<div style="color: red;">') || WEEK_DAY || decode(dated,TRUNC(SYSDATE),'</div') week_day ,
decode(dated,TRUNC(SYSDATE),'<div style="color: red;">') || CUSTOMER_ID || decode(dated,TRUNC(SYSDATE),'</div') customer_id ,
decode(dated,TRUNC(SYSDATE),'<div style="color: red;">') || c_inf_api.get_name(t.customer_id) || decode(dated,TRUNC(SYSDATE),'</div') customer_name ,
XXX_TABLE,
XXX_TABLE,
XXX_TABLE,
XXX_TABLE,
t.YYY_TABLE,
T.OBJID,
T.OBJVERSION,
decode(dated,TRUNC(SYSDATE),'<div style="color: red;">') || T.STATE || decode(dated,TRUNC(SYSDATE),'</div') state
FROM time_db_qry t,
p_info p
WHERE p.person_id=t.person_id
AND t.dated BETWEEN trunc(SYSDATE)-4 AND trunc(SYSDATE) + 25
and p.user_id='XXXXX'
ORDER BY dated
I have seen this before. It looks like you put html markup in your textbox and then posted the form. Asp.Net catches that and throws an error for security reasons. It will make your app slightly less secure, but if you really need to pass that html, this will work:
It appears you can also do it for just one page.
Credit where credit is due