<script type="text/javascript">
$(function() {
$('.datePicker').datetimepicker({ dateFormat: 'dd/mm/yy' });
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" class="datePicker" runat="server"></asp:TextBox>
<asp:UpdatePanel ID="holder" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:DropDownList runat="server" ID="ddl_RespondBy" AutoPostBack="true" OnSelectedIndexChanged="ddl_SelectedIndexChanged">
<asp:ListItem Selected="True">1 Hour</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txt_RespondBy" class="datePicker" Visible="true" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddl_RespondBy" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
protected void ddl_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddl_RespondBy.SelectedItem.Text == "Other")
{
txt_RespondBy.Visible = true;
}
else
{
}
}
मैं अद्यतन पैनल के साथ वापस, मैं है आंशिक पोस्ट कर दो पाठ बॉक्स एक बाहर अद्यतन पैनल और एक के अंदर है, जब मैं ड्रॉप-डाउन से अन्य का चयन करें और करने की कोशिश txt_RespondBy टेक्स्ट बॉक्स के अंदर कैलेंडर खोलें जो यह प्रदर्शित नहीं होता है, लेकिन अपडेट पैनल के बाहर टेक्स्ट बॉक्स कैलेंडर दिखाता है। क्यों जावास्क्रिप्ट आंशिक पोस्टबैक के बाद अंदर अद्यतन पैनल काम नहीं कर रहाजावास्क्रिप्ट आंशिक पोस्टबैक के बाद काम नहीं करता है
हाँ, अब काम करता है। धन्यवाद – Mark