Saturday 19 May 2012

static autocomplet text box in ASP.NET using jquery

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Jquery.aspx.cs" Inherits="Jquery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var countries = ["india", "indiaaa", "inddd"];
            $("#a").autocomplete({ source: countries });
        });
    </script>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <input type="text" runat="server" id="a" />
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment