I find it puzzling why there is confusion between asp.net controls like a button or link button compared to html markup.
I fail to see the connection between these two issues and the initial question.
You mentioned having a bootstrap menu.
So, the main query here is how can I make a dropdown trigger automatically on hover instead of requiring a click on the menu?
Take this menu for example:
(I skipped some parts of the menu, but you get the idea).
This snippet includes a typical Bootstrap dropdown menu structure where a hover event triggers the dropdown:
<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>
<li id="mAdmin" runat="server" class="dropdown" ClientIDMode="Static">
<a runat="server" href="#" data-toggle="dropdown"
class="dropdown-toggle"
>Auto Buttons Dropdown Test<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a runat="server" href="~/SiteAdmin/Messages">Manage Portal Email Messages</a></li>
<li><a runat="server" href="~/Staff/CurrentUsersS">Show Logged on users</a></li>
<li><a runat="server" href="~/SiteAdmin/OneMonth">Month Logon Summary</a></li>
<li><a runat="server" href="~/SiteAdmin/EditChoices">Change/Edit Issue tracker choices</a></li>
<li><a runat="server" href="~/SiteAdmin/SetUp">Developer site settings</a></li>
<li><a onclick="hasproof()">My Proofs - testing</a></li>
<li><a runat="server" href="~/SiteAdmin/Issues">Issues Tracker and to-do list</a></li>
<li><asp:LinkButton ID="LinkButton1" runat="server">LinkButton Test</asp:LinkButton></li>
</ul>
</li>
</ul>
</div>
The final choice in the menu is a common example of a dropdown in a Bootstrap menu bar that requires a click.
https://i.sstatic.net/HH1YI.gif
However, you can modify the menu to display the dropdown on hover without the need for a click.
Simply add this style to your page:
<style>
.dropdown:hover .dropdown-menu {
display: block;
margin-top: 0; /* remove the gap so it doesn't close */
}
</style>
Now, hovering over the menu item will automatically expand the dropdown:
https://i.sstatic.net/7JyBi.gif
Your markup already includes some link buttons with click events which appear well-integrated. Using a link button rather than a standard button improves the menu's appearance. The key goal remains making the dropdown menu expand on hover, regardless of whether it's an "a" link or a link button.
To achieve the desired behavior, apply the provided style to trigger the automatic expansion of the dropdown menu upon hover action.