Mahendra Kumar

Mahendra Kumar

  • NA
  • 164
  • 5.4k

Jquery datepicker is not work after postbback in asp.net

Nov 16 2017 3:53 AM
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="AdminPanel_Default2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="styles/jquery-ui.css" rel="stylesheet" />
<script src="scripts/jquery-1.9.1.js"></script>
<script src="scripts/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function () {
//$("#datepicker").datepicker();
$('#datepicker').datepicker({ minDate: 0 });
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="datepicker" runat="server" CssClass="classTarget"></asp:TextBox>
<asp:DropDownList AutoPostBack ="true" OnSelectedIndexChanged ="DropDownList1_SelectedIndexChanged" ID="DropDownList1" runat="server">
<asp:ListItem >Mahendra</asp:ListItem>
<asp:ListItem >Mahendra</asp:ListItem>
<asp:ListItem >Mahendra</asp:ListItem>
<asp:ListItem >Mahendra</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

Answers (1)