Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
118619 Points
18779 Posts
Apr 10, 2011 01:29 AM|LINK
Generally speaking, as far as I know, I think Asp.net, for its security, doesn't allow to execute a js script.
However if you really want to do so, please try either of the two ways:
1) 、In web.config, you can see <system.web> tags, please add this inside——<pages validaterequest="false"/>
Sample:
<?xml version="1.0" encoding="gb2312" ?> <configuration> <system.web> <pages validaterequest="false"/> </system.web> </configuration> 2、In the head of your aspx page—— <%@ page validaterequest="false" language="c#" codebehind="index.aspx.cs" autoeventwireup="false" inherits="mybbs.webform1" %>
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: XSS problem
Apr 10, 2011 01:29 AM|LINK
Generally speaking, as far as I know, I think Asp.net, for its security, doesn't allow to execute a js script.
However if you really want to do so, please try either of the two ways:
1) 、In web.config, you can see <system.web> tags, please add this inside——<pages validaterequest="false"/>
Sample:
<?xml version="1.0" encoding="gb2312" ?>
<configuration>
<system.web>
<pages validaterequest="false"/>
</system.web>
</configuration>
2、In the head of your aspx page——
<%@ page validaterequest="false" language="c#" codebehind="index.aspx.cs" autoeventwireup="false" inherits="mybbs.webform1" %>