Damian Mehers' Blog Xamarin from Geneva, Switzerland.


Hiding the ListSearch Extender Prompt Message

You can hide the ListSearch Extender's prompt message, so that it does not show, by setting the style to "display:none", like this.

Define a CSS class in a StyleSheet"StyleSheet.css":

Then in your ASPX use the Style for the ListSearch Prompt:

<head runat="server">
    <title>Don't show ListSearch Extender Prompt</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <form id="form1" runat="server">
        <asp:ScriptManager ID="SM1" runat="server" />

        <asp:ListBox ID="LB1" runat="server">
        <cc1:ListSearchExtender ID="LSE1" runat="server"

Filed under: AJAX Leave a comment
Comments (12) Trackbacks (0)
  1. very interesting, but I don’t agree with you

  2. Hi,

    I have updated my code in AJAXControlToolkit and put new dll into bin folder of the application. But I don’t see the the changes(mean I’m still seeing ‘type to search’ which I wanted to use dontshowprompt css class). I also can’t see the updates when I run Toolkit test project which is inside the same project. And when I run SampleWebSite under that project, first time click on the list got a javascript error and later, it works.
    Can you please point me out, where to put new dll and whether am I on the right track or not? Actually, I want to display the text typing on status bar, but no ‘type to search’ text. Can you show me how that can be done?

    thanks a lot!

  3. You shouldn’t need to create a new DLL or update the control toolkit to work — just define the CSS and use the CSS class as the PromptCssClass …

  4. Thanks for the reply dmehers. I tried it, but it only works for list search in SampleWebsite, and doesn’t even work for ToolkitTests project and neither for my project. Any idea what might the cause be?

  5. I got hiding ‘type to search’ works. I was trying to add and use ‘css’ file from AjaxControlToolkit, whereas the solution is I just need to create a new css file for my project and add the ‘style’ code there and call it from my aspx file. See? I’m a noob here, don’t know which stylesheet you guys were talking about and I’m looking for it. Thanks again!

  6. Right. This isn’t working for me.

    .NET Framework 2.0.

    I have:

    in my .ASPX page, and

    display: none;

    inside of my style.css

  7. ok, it killed the HTML out of my .ASPX. let’s try unicode.

    “asp:DropDownList ID=”ddlCommodity” runat=”server” Width=”250px” DataTextField=”commoditydesc” DataValueField=”commodityid””

    “cc1:ListSearchExtender PromptCssClass=”noshow” id=”lseCommodity” runat=”server” TargetControlID=”ddlCommodity”/”

  8. Yeah, it’s completely ignoring my css class. I can change it to anything I want and it’s not doing it.

  9. Hi Nathaniel,

    How are you referencing the style.css CSS from your ASP.NET page?

    Could you try using another class from the CSS file in your ASP.NET page to ensure that the CSS is being properly referenced?

  10. I’m referencing the style.css CSS file inside of the master page. The LSE is on a DropDownList and both are inside of a table cell.

    The table cell has borders and background set by classes from within the style.css, so it’s definitely being properly referenced.

    All of this, btw, is inside of an UpdatePanel.

    Also, I tried doing a custom Animation using HideAction, but the documentation for a ListSearchExtender mentions the OnShow and OnHide events, neither of which exist, apparently, because I get an error when I try to wire them to the animation.

    But here’s what apparently worked —

    When I moved the ListSearchExtender out of the table cell it was in (but still within a master layout table), it apparently decided to stay hidden.

  11. I can’t type at all. Listboxes aren’t editable, so “Type to search” makes no sense because you can’t type. You can’t edit Listboxes at all and adding a list search extender doesnt automagicly make them editable.

    It all seems like the AJAX toolkit is in over its own head

  12. Hi,The right sidebar is tounihcg the middle column in the homepage as you can see. I want to change the size same like left sidebar, not tounihcg the middle column.Thanks for reply.

Leave a comment

No trackbacks yet.