我有一个注册向导页面,并使用了一些下拉列表。我添加了scriptmanager,我已经使用了更新面板。但是只有第一个updatepanel正常工作,我不能从其他更新面板中的下拉列表中选择值。当我将这些下拉列表插入第一个更新面板时,我可以获取这些下拉列表的值。为什么会这样?我能为此做些什么?
我的第一个更新面板正常运行:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="control-group">
<label for="Il" class="control-label">İl</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="City" ID="ddlCity" data-rule-required="true" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
<asp:ListItem Text="İl Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
<div class="control-group">
<label for="Ilce" class="control-label">İlçe</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="District" ID="ddlDistrict" data-rule-required="true" AppendDataBoundItems="true">
<asp:ListItem Text="İlçe Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlCity" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
我的所有aspx页面:
<body>
<div class="container-fluid" id="content">
<div class="row-fluid">
<div class="span8">
<div class="box">
<div class="box-title">
<h3>
<i class="icon-magic"></i>
Bireysel Müşteri Hesap Açma Formu
</h3>
</div>
<div class="box-content">
<form runat="server" novalidate="novalidate" class="form-horizontal form-wizard ui-formwizard" id="Form1">
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server">
</asp:ScriptManager>
<div style="display: block;" class="step ui-formwizard-content" id="Div3"...>...</div>
<div style="display: none;" class="step ui-formwizard-content" id="Div4">
<ul class="wizard-steps steps-4">...</ul>
<div class="step-forms">
<div class="control-group">...</div>
<div class="control-group">...</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="control-group">
<label for="Il" class="control-label">İl</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="City" ID="ddlCity" data-rule-required="true" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
<asp:ListItem Text="İl Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
<div class="control-group">
<label for="Ilce" class="control-label">İlçe</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="District" ID="ddlDistrict" data-rule-required="true" AppendDataBoundItems="true">
<asp:ListItem Text="İlçe Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlCity" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
</div>
</div>
<div style="display: none;" class="step ui-formwizard-content" id="Div5">
<ul class="wizard-steps steps-4">...</ul>
<div class="step-forms">
<div class="control-group">...</div>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlHizmetSecimi" EventName="SelectedIndexChanged"/>
</Triggers>
<ContentTemplate>
<div class="control-group">
<label for="HizmetSecimi" class="control-label">Hizmet Seçimi</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" name="HizmetSecimi" runat="server" ID="ddlHizmetSecimi" data-rule-required="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlHizmetSecimi_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Lütfen Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
<div class="control-group">
<label for="TarifeSecimi" class="control-label">Tarife Seçimi</label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="TarifeSecimi" ID="ddlTarifeSecimi" data-rule-required="true" AppendDataBoundItems="true" Enabled="false">
<asp:ListItem Text="Lütfen Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
<div class="control-group">
<asp:Label for="PaketSecimi" Visible="false" id="lblPaket" class="control-label" runat="server" Text="Paket Seçimi"></asp:Label>
<div class="controls">
<asp:DropDownList class="ui-wizard-content" runat="server" name="PaketSecimi" ID="ddlPaketSecimi" data-rule-required="true" AppendDataBoundItems="true" sty Visible="false">
<asp:ListItem Text="Seçiniz" Value="" />
</asp:DropDownList>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="control-group">...</div>
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">...</asp:UpdatePanel>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
<div class="control-group">...</div>
</div>
</div>
<div style="display: none;" class="step ui-formwizard-content" id="fourthstep"...>...</div>
<div class="form-actions">...</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
请帮忙。提前致谢
答案 0 :(得分:0)
将每个下拉列表的autopostback属性设置为true
as
AutoPostBack="true"
您仅将它用于第一个下拉列表,为其他人执行相同操作。
<asp:DropDownList class="ui-wizard-content" name="HizmetSecimi" runat="server" ID="ddlHizmetSecimi" data-rule-required="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlHizmetSecimi_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Text="Lütfen Seçiniz" Value="" />
</asp:DropDownList>