I am working on an ASP.NET web page with a Bootstrap UI. The issue I'm facing is trying to make an ASP.NET DropDownList in the navbar appear like a Bootstrap Dropdown. Currently, my navbar looks like this:
https://i.sstatic.net/AYenE.png
However, I want it to have more of this appearance:
https://i.sstatic.net/qREzK.png
Below is the HTML code for the navbar:
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" runat="server" href="~/">Application name</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a runat="server" href="~/">Home</a></li>
<li><a runat="server" href="~/About">About</a></li>
<li><a runat="server" href="~/Contact">Contact</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<asp:DropDownList runat="server" ID="ddlLanguage" AutoPostBack="true" CssClass="k-dropdown">
<asp:ListItem Text="English" Value="en-us" />
<asp:ListItem Text="Francais" Value="fr" />
</asp:DropDownList>
</li>
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li><a runat="server" href="~/admin">Admin</a></li>
<li><a runat="server" href="~/Account/Manage" title="Manage your account">Hello, <%: Logic.HelperFunctions.GetUser.FirstName %>!</a></li>
<li>
<asp:LoginStatus runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" OnLoggingOut="Unnamed_LoggingOut" />
</li>
</LoggedInTemplate>
</asp:LoginView>
</ul>
</div>
I need help adjusting the CSS to show the language DropDownList aligned to the right and centered vertically. The server control's CssClass attribute doesn't seem to be effective in achieving this. It's crucial for the DropDownList to be a server control as the site's language changes based on the AutoPostback event triggered by selecting a language option.