I have been encountering an issue with my ASP .NET code. I have spent hours researching but haven't found a solution that works for me. My problem is that when I click a button, the text inside a textbox should be added to a dropdown and update a table without refreshing the entire page. I attempted to use an UpdatePanel for this functionality, but when it triggers, the dropdown loses its Bootstrap CSS styling.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td>
</asp:Label> <asp:Label ID="Label1" runat="server"
Text="Clearance No."></asp:Label>
</td>
<td>
<asp:TextBox ID="Textbox1" runat="server" Enabled="False">
</asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="dropdown1" runat="server">
</asp:DropDownList>
</td>
<asp:TextBox ID="Textbox2" runat="server" Enabled="true">
</asp:TextBox>
<td>
</td>
<td>
<asp:Button ID="Button1" runat="server" Text="Add To
Dropdown" OnClick="Button1_Click" />
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1"
EventName="Click" />
</Triggers>
</UpdatePanel>