DotNetNuke 5.14 Search User Enter Key Issue

A04C0091

I recently upgraded a dotnetnuke installation and found several issues that are either different from the 4.x series or are now broken.

Most annoying is that there is now no longer any visual indication that a module is viewable by the administrator only.  Seems there should at least be a CSS class added to the module so that we can control the visual representation ourselves if we want.

Unfortunately there is nothing we can do about that.

But another issue that showed up is in the user screen.

There is a search box where you should be able to search for a user as the administrator.  If you put your cursor in that field, put in a name, and press the ENTER key on your keyboard, you are directed to the Admin icons screen.  This is a new screen that was added in 5.x.

This is because the Admin LinkButton is getting “clicked” when you press the ENTER key.

To fix it, all we need to do is wrap the three controls–textBox, DropDown, and LinkButton–in a Panel and make the LinkButton the default button of the panel.

If you’d like to fix this yourself, open up the Users.ascx file located in ~\DesktopModules\Admin\Security\ .  Make sure you don’t pick the User.ascx file–there are two files.  You want the one with an S at the end.

Change this code

<td class="Normal" align="left" width="*">
    <asp:textbox id="txtSearch" Runat="server">
        </asp:textbox>
    <asp:dropdownlist id="ddlSearchType" Runat="server" />
    <asp:imagebutton id="btnSearch" Runat="server"
         ImageUrl="~/images/icon_search_16px.gif">
        </asp:imagebutton>
</td>

To this code

<td class="Normal" align="left" width="*">
    <asp:Panel ID="Panel1" runat="server"
       DefaultButton="btnSearch">
    <asp:textbox id="txtSearch" Runat="server">
        </asp:textbox>
    <asp:dropdownlist id="ddlSearchType" Runat="server" />
    <asp:imagebutton id="btnSearch" Runat="server"
       ImageUrl="~/images/icon_search_16px.gif">
       </asp:imagebutton>
    </asp:Panel>
</td>

and everything will work like it should.

Related Post

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear