在下拉列表的选定索引更改日历扩展程序不起作用 [英] On selected index change of a drop down list calendar extender is not working
本文介绍了在下拉列表的选定索引更改日历扩展程序不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
on selected index change of a drop down list calendar extender is not working
string strChangeValue = ddlAddchanges.SelectedItem.Text.ToString();
if (strChangeValue == "Yes")
{
txtChangerequiremnetDetails.Enabled = true;
txtTargetdateforchanges.Enabled = true;
txtStartdateforchanges.Enabled = true;
txtEnddateforchanges.Enabled = true;
txtAgeforchanges.Enabled = true;
}
日历扩展程序无法使用启用的文本盒子。
我在html页面中也使用过Update面板
我尝试了什么:
the calendar extender is not working on the enabled text boxes.
I have used Update panel in the html page as well
What I have tried:
if (strChangeValue == "Yes")
{
txtChangerequiremnetDetails.Enabled = true;
txtTargetdateforchanges.Enabled = true;
txtStartdateforchanges.Enabled = true;
txtEnddateforchanges.Enabled = true;
txtAgeforchanges.Enabled = true;
}
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
<asp:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true" EnableScriptLocalization="true"
ID="scr1" ScriptMode="Debug" CombineScripts="false" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="panelEdit" runat="server" Visible="true">
推荐答案
你应该在UpdatePanel中使用TRIGGERS
You should use TRIGGERS in UpdatePanel
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<!--Content--> </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnSubmit" /> </Triggers>
</asp:UpdatePanel>
在触发部分,使用按钮的ID或任何控件内容发布。
In trigger section, Use the ID of the button or any control that makes the content post.
这篇关于在下拉列表的选定索引更改日历扩展程序不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文