Saturday, 6 February 2016

How to Use Jquery DatePicker within Ajax UpdatePanel Using in Asp.Net

Use Jquery DatePicker within Ajax UpdatePanel

Jquery Date Picker use to inside of ajax updatepanel because of  Avoid postback use to pageload using  Jquery in Asp.Net.

                                DEMO

                      

                                 Download

                           HTML CODING

<html xmlns="http://www.w3.org/1999/xhtml">
<head >
    <title>How to Use Jquery DatePicker within Ajax UpdatePanel Using in Asp.Net</title>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
     <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css"/>
    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
    <script type="text/javascript" lang="javascript">
        function pageLoad() {
            $(function () {
                $("#<%=txtDate.ClientID%>").datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: "dd/mm/yy"
                });
            });
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
           Select Date <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>          
        </ContentTemplate>
    </asp:UpdatePanel></div>
    </form>
</body>
</html>








0 comments:

Post a Comment