C# 在listview中更新listbox值的另一种方法

C# 在listview中更新listbox值的另一种方法,c#,asp.net,listview,listbox,C#,Asp.net,Listview,Listbox,我在由SqlDataSource填充的ListView中有一个ListBox。此列表框位于我的列表视图的插入项模板中。 有没有办法在列表框中选择一个值,单击“更新”按钮并打开一个带有所选值的文本框,以便用户可以更改要保存和更新的信息?我在想是否有办法打开一个弹出窗口或显示所选值的TextBox,以便我可以更新它 <asp:ListView ID="FormSectionListView" runat="server" InsertItemPosition="FirstItem">

我在由
SqlDataSource
填充的
ListView
中有一个
ListBox
。此
列表框
位于我的
列表视图
插入项模板
中。 有没有办法在
列表框中选择一个值
,单击“更新”按钮并打开一个带有所选值的
文本框
,以便用户可以更改要保存和更新的信息?我在想是否有办法打开一个弹出窗口或显示所选值的
TextBox
,以便我可以更新它

<asp:ListView ID="FormSectionListView" runat="server" InsertItemPosition="FirstItem">
    //omitted other templates because I am not using them.
    <InsertItemTemplate>
        <tr style="">
            <td>
                <div style="font-size: .8em; display: block">
                    <asp:FormView ID="FormSectionFormView" runat="server" DataKeyNames="FormSectionID" DataSourceID="FormSectionDataSource" RowStyle-VerticalAlign="NotSet">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:Button ID="InsertButton"
                                                runat="server"
                                                Text="Insert" 
                                                OnClick="FormSectionButton_Click" 
                                                Font-Size="1.2em" />
                                    <asp:Button ID="UpdateButton"
                                                runat="server"
                                                Text="Update"
                                                Font-Size="1.2em"/>              
                                </td>
                                <td align="center">
                                    <div style: align="center">
                                        <asp:Label ID="Label1"
                                                   runat="server"
                                                   Font-Bold="true"
                                                   Text="Section Instruction"
                                                   Font-Size="1.2em">
                                        </asp:Label>
                                    </div>
                                    <div style="width:800px; height:auto; overflow:auto">
                                        <asp:ListBox ID="SectionInstructionListBox"
                                                     DataSourceID="SectionInstructionSource"
                                                     runat="server"
                                                     DataTextField="Instruction"
                                                     Visible="True" />
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <div style="padding-top: 4em; width:800px">
                                        <asp:Label ID="Label5"
                                                   runat="server"
                                                   Font-Bold="true"
                                                   Text="Insert New Instruction"
                                                   Font-Size="1.2em">
                                        </asp:Label>              
                                        <asp:TextBox ID="SectionInstructionTextBox"
                                                     runat="server"
                                                     Width="800px" />
                                    </div>
                                </td>       
                            </tr>
                        </ItemTemplate>
                    </asp:FormView>
                </div>
            </td>
        </tr>
    </InsertItemTemplate>
</asp:ListView>

//省略了其他模板,因为我没有使用它们。

为什么有ASP.NET代码,但问题标记为
wpf
?@Herdo抱歉,这是个错误