More in this section
Blogs RSS feed

Implementing search for Users Administration screen in Sitefinity backend

by User Not Found


Please note that the template has been revised to address the changes in Sitefinity 5.0 SP1 - build 5.0.2800

If you're experiencing any problems running the sample in the above mentioned version, please download the revised template - UsersListCustom and replace the old one in your ControlTemplates folder.


Many of you have requested an easier way to search for users in Sitefinity backend Users Administration. Such functionality can be really useful to ones managing projects with multiple users, where searching for a particular user may become a tedious task.

To address your feedback, we have scheduled the implementation of this feature for our upcoming Sitefinity 5.1 release. In the meantime, however, I'll list below a quick workaround that will allow you to enjoy the same functionality.

 Let me elaborate a little bit on what we'll be doing. By default the control used to display the users in /Sitefinity/Administration/Users is being bound client-side, so we'll just modify the template used there slightly, to pass a desired value (username) to the service responsible for getting the users. With a minimum amount of intervention we'll end up having a textbox and a search button, which when clicked filters the list, returning those users who match (have in mind we're using sub-string match, so you can look for users by parts of their UserName as well).

What we're adding to the default template is pretty simple - a textbox for entering the UserName and a button to submit the data to the service. They are both added to the command actions ribbon on top of the users grid control:

      <asp:TextBox runat="server" ID="SearchUserName"/>
      <asp:Button Text="Search" ID="SearchUserButton"
        runat="server" OnClientClick="SearchUserButton_Click(); return false;"  />

We'll be handling the Click event with a client-side function which reads the value entered in the textbox and sets the filterExpression for the service:

function SearchUserButton_Click() {
       var searchUserName = $get('<%= SearchUserName.ClientID %>');
       var urlParams = [];
       if (searchUserName != null) {
           if (searchUserName.value != null) {
               _currentFilter = "UserName.Contains(\"" + searchUserName.value + "\")";
You can find attached to this post a sample modified template ready to be extracted in your project, and you'll just need to map it in Sitefinity backend by going to Administration->Settings->Advanced->Controls->ViewMap and creating a new entry there. please fill in the boxes accordingly:

HostType: Telerik.Sitefinity.Security.Web.UI.Principals.UsersList

LayoutTemplatePath: enter here the application relative path to the template you've extracted in your project (for your convenience I'm also attaching a screenshot demonstrating the mapping settings in my local project.)

Save the changes and restart your application to make sure you're not loading the cached version of the template.

For more information on mapping external templates globally for Sitefinity, I believe you might find this great post by Josh Morales very useful.


You should now have the searchbox in your /Sitefinity/Administration/Users screen, enjoy the new feature you've added to your project and please do not hesitate to let us know of any other improvements or constructive feedback you might have on the product functionality. We'll be glad to address them.







Leave a comment
  1. Kristian Jan 16, 2012
    Very cool!

    When trying to modify the search filter I wanted to use the user's first/last name. The response returns the name as DisplayName but creating the filter by using _currentFilter = "DisplayName.Contains(\"" + searchUserName.value + "\")"; causes a 500 server error.
  2. Boyan Jan 18, 2012
    Hey Kristian,

    Actually DisplayName is not a public property of User or UserProfile but is constructed dynamically for internal usages, that's why you cannot directly use it in your code (you need a call to UserProfilesHelper.GetUserDisplayName). Since the service to which we're passing the filterExpression operates with objects of type User we can only filter by public properties of this object.
  3. Hardy Mar 30, 2012
    Thanks Boyan. Very helpful article.

  4. Amanda S Apr 19, 2012
    This caused an error once I upgraded to 5.02800 . I removed the custom control and now I am able to open my users administration panel.

    Will this functionality ever be restored to the out-of-box product?
  5. Boyan May 08, 2012
    Hello guys,

    Apologies for the inconvenience - I have revised the template to address the newly introduced changes, you can find the revised version in the Attachments section above. Just replace the old template with the new one, and the search functionality should be working again.
  6. GaryZ Jun 07, 2012
    Thanks for the help. The filtering doesn't seem to work if I change it to search on LastName:

    _currentFilter = 
    "LastName.Contains(\"" + searchUserName.value + "\")";

    Am I missing something?
  7. GaryZ Jun 07, 2012
    Thanks for the help. The filtering doesn't seem to work if I change it to search on LastName:

    _currentFilter = 
    "LastName.Contains(\"" + searchUserName.value + "\")";

    Am I missing something?
  8. James Aug 11, 2016
    I found this post very helpful Thanks for Sharing! products
  9. Hilary Addison Oct 21, 2016
    I would like to talk about site infinity progress because I am video artist at Get 2d Animation Services Prices and say that Advance is a trusted hotspot for the computerized promoting development expected to make trans formative client encounters that fuel business achievement.

    Leave a comment