I am unable to search data in asp the code is given bellow :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Search Petition Status</title>
</head>
<body>
<form action="input.asp" method="GET" name="form1">
<table>
<tr>
<td>Full Name:</td>
<td><input name="TxtName" id="TxtName" type="text" /></td>
</tr>
</table>
<input name="button" ID="Button1" value="submit" type="Submit" />
</form>
</body>
</html>
<%
If Request.ServerVariables("REQUEST_METHOD") = "GET" then
Dim Conn, Rs, ConnString, SQL_Search
Dim name1
name1 = request.form("TxtName")
pno1 = request.form("TxtPNO")
Set Conn= Server.CreateObject("ADODB.Connection")
ConnString = "DSN=mydsn;User Id=sa;Password=sa123;Database=mysearch"
Conn.Open ConnString
SQL_Search= "select * from register where (TxtName like'%" + TxtName.text" or pno like'%" + TxtPNO.text + "%') "
Conn.Execute SQL_Search
response.Write(Name)
response.Write(email)
response.Write(phonenumber)
response.Write(company)
response.Write(title)
response.Write(pno)
response.End
Conn.Close
Set Conn = Nothing
Set SQL_Search = Nothing
End If
%>