I USE THIS
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script src="scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="scripts/jquery.autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#<%=txtSearch.ClientID%>").autocomplete('Search_Auto.ashx');
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>
===================
<%@ WebHandler Language="C#" Class="Search_Auto" %>
using System;
using System.Web;
using System.Data.OracleClient;
using System.Configuration;
using System.Text;
using System.Web.Configuration;
public class Search_Auto : IHttpHandler {
public void ProcessRequest (HttpContext context) {
string prefixText = context.Request.QueryString["q"];
// string strConn = WebConfigurationManager.ConnectionStrings["Oracle_Itech"].ConnectionString;
string strConn;
strConn = WebConfigurationManager.ConnectionStrings["Oracle_Itech"].ConnectionString;
// strConn = WebConfigurationManager.ConnectionStrings["Oracle_Itech"].ConnectionString.ToString();
OracleConnection Conn = new OracleConnection(strConn);
Conn.Open();
string sqltitle = "select XACCDESC from plmster where XACCDESC like '" + prefixText + "%'";
StringBuilder sb = new StringBuilder();
OracleCommand com = new OracleCommand(sqltitle, Conn);
OracleDataReader reader; //= com.ExecuteReader();
reader = com.ExecuteReader();
while (reader.Read())
{
sb.Append(reader["XACCDESC"])
.Append(Environment.NewLine);
}
Conn.Close();
context.Response.Write(sb.ToString());
}
public bool IsReusable {
get {
return false;
}
}
}
NOT WORKING WHEN I USED MANUALLY like 'c%' ITS COMMING