UpldatePanel中的ASP.Net RadioButton列表仅选择第一项

UpldatePanel中的ASP.Net RadioButton列表仅选择第一项,asp.net,vb.net,asp.net-ajax,updatepanel,radiobuttonlist,Asp.net,Vb.net,Asp.net Ajax,Updatepanel,Radiobuttonlist,在我的.aspx页面中:我有3个Radiobuttonlist,它们都连接到Sqldatasource 显示数据后,我单击的每个选项都会转到第一个选项并被选中 例如,我选择了第三个选项,但它转到了第一个选项 我没有写任何代码到服务器!!!我不知道为什么会这样 我写的代码与下面的代码完全相同: <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptMan

在我的.aspx页面中:我有3个Radiobuttonlist,它们都连接到Sqldatasource

显示数据后,我单击的每个选项都会转到第一个选项并被选中

例如,我选择了第三个选项,但它转到了第一个选项

我没有写任何代码到服务器!!!我不知道为什么会这样

我写的代码与下面的代码完全相同:

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                    <p style="text-align:center;">
                        <img src="assets/ajax-loader.gif" /></p>
                </ProgressTemplate>
            </asp:UpdateProgress>
            <div class="col-md-6">
                <div class="col-md-12 alefbasystemdotcom">
                    <span style="font-weight: bold;">Zusatzoptionen:</span>
                    <asp:RadioButtonList ID="rbloptions" runat="server" AutoPostBack="True" DataSourceID="sdsoptions" DataTextField="name" DataValueField="price">
                    </asp:RadioButtonList>
                    <asp:SqlDataSource ID="sdsoptions" runat="server" ConnectionString="<%$ ConnectionStrings:HamoConStr %>"
                        SelectCommand="SELECT * FROM TypeExtraPay WHERE type='extra' AND cat=1">
                    </asp:SqlDataSource>
                </div>
                <div class="col-md-12 alefbasystemdotcom">
                    <span style="font-weight: bold;">Verarbeitung und Veredelung:</span>
                    <asp:RadioButtonList ID="rblproccess" runat="server" AutoPostBack="true" DataSourceID="sdsproccess" DataTextField="name" DataValueField="price">
                    </asp:RadioButtonList>
                    <asp:SqlDataSource ID="sdsproccess" runat="server" ConnectionString="<%$ ConnectionStrings:HamoConStr %>"
                        SelectCommand="SELECT * FROM TypeExtraPay WHERE type='post' AND cat=1">
                    </asp:SqlDataSource>
                </div>
                <div class="col-md-12 alefbasystemdotcom">
                    <span style="font-weight: bold;">Angestrebter Liefertermin:</span>
                    <asp:RadioButtonList ID="rbldeliverydate" runat="server" AutoPostBack="true" DataSourceID="sdsdelivery" DataTextField="name" DataValueField="price">
                    </asp:RadioButtonList>
                    <asp:SqlDataSource ID="sdsdelivery" runat="server" ConnectionString="<%$ ConnectionStrings:HamoConStr %>"
                        SelectCommand="SELECT * FROM TypeExtraPay WHERE type='deliverydate' AND cat=1">
                    </asp:SqlDataSource>
                </div>
                <asp:Label Text="" ID="mylbl" runat="server" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</form>

Zusatzoptionen: Verarbeitung和Veredelung: Angestrebter Liefertermin:

感谢您的帮助

这是因为RadioButton在click事件的selectedIndex changes上再次列出数据绑定。您希望选择任何特定项目还是保留以前选择的项目?向我们展示您到目前为止尝试了什么?我有一个标签,所有RadioButton列出它们的值是价格,现在我希望选择每个RadioButton列表中的每个项目,我更新价格并显示在标签中。在每个SelectedIndexChanged radiobuttonlist中,我都写到:mylbl.Text=rblalefBasystemProcess.SelectedValue+rblalefbasystemoptions.SelectedValue+rblalefbasystemdeliverydate.SelectedValue