kuldeep suman

kuldeep suman

  • 1.5k
  • 247
  • 1.9k

Auto Complete text box not working in Master's content page

Oct 2 2016 11:34 AM
&lt;head runat="server"&gt;<br /> &lt;title&gt;AutoComplete Text Box using jQuery in ASP.NET&lt;/title&gt;<br /> &lt;link href="jquery-ui.css" rel="stylesheet" type="text/css" /&gt;<br /> &lt;script src="jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;<br /> &lt;script src="jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;<br /> <br /> &lt;script type="text/javascript"&gt;<br /> $(document).ready(function() {<br /> SearchText();<br /> });<br /> function SearchText() {<br /> $("#txtEmpName").autocomplete({<br /> source: function(request, response) {<br /> $.ajax({<br /> type: "POST",<br /> contentType: "application/json; charset=utf-8",<br /> url: "Default.aspx/GetEmployeeName",<br /> data: "{'empName':'" + document.getElementById('txtEmpName').value + "'}",<br /> dataType: "json",<br /> success: function(data) {<br /> response(data.d);<br /> },<br /> error: function(result) {<br /> alert("No Match");<br /> }<br /> });<br /> }<br /> });<br /> }<br /> &lt;/script&gt;<br /><br />&lt;/head&gt;

Answers (3)