<%@ Page language= "C #" autoeventwireup= "true" codefile= "TestSQLInjection.aspx.cs" inherits= "Sqlinjection_" Testsqlinjection "%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title> Untitled Page </title>
<body>
<form id= "Form1" runat= "Server" >
<div>
<asp:textbox id= "TextBox1" runat= "Server" ></asp:TextBox>
<br/>
<asp:textbox id= "TextBox2" runat= "Server" ></asp:TextBox>
<br/>
<asp:textbox id= "TextBox3" runat= "Server" ></asp:TextBox>
</div>
<asp:button id= "Btnpost" runat= "Server" onclick= "Btnpost_click"
Text= "get post data"/>
<asp:button id= "Btnget" runat= "Server" onclick= "button2_click" text= "Fetch get Data"/>
</form>
</body>
Testsqlinjection.aspx.cs file
Using System;
Using System.Collections;
Using System.Configuration;
Using System.Data;
Using System.Linq;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.HtmlControls;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.Xml.Linq;
public partial class SQLInjection_TestSQLInjection:System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e)
{
}
protected void button2_click (object sender, EventArgs e)
{
Response.Redirect ("Testsqlinjection.aspx?") Id=100&cc=200&dd=300 ");
}
protected void Btnpost_click (object sender, EventArgs e)
{
}
}