Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:32:57+00:00 2026-06-07T20:32:57+00:00

I have a asp.net dropdown control to which tool tip has been added. It

  • 0

I have a asp.net dropdown control to which tool tip has been added. It works fine on the mouse over. I also have a Modal Popup in that page. When I open and close the Modal Popup the tool tip in the drop are no more shown.

Below is my code.

       <div class="col">
            <div class="labelname required">
                <asp:Label ID="lblsupplier" runat="server" Text="Supplier"></asp:Label>
            </div>
            <div class="labelvalue">
                <asp:DropDownList ID="DdlSupplier" TabIndex="11" runat="server" AutoPostBack="true"
                    CausesValidation="false" OnSelectedIndexChanged="DdlSupplier_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="reqSupplier" runat="server" ControlToValidate="DdlSupplier"
                    ValidationGroup="SubmitGroupMain" InitialValue="0" ErrorMessage="Please Select Supplier Name"
                    SetFocusOnError="true" Display="None"></asp:RequiredFieldValidator>
                <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="Server"
                    TargetControlID="reqSupplier" HighlightCssClass="validatorCalloutHighlight">
                </ajaxToolkit:ValidatorCalloutExtender>
            </div>
            <asp:LinkButton runat="server" ID="lnkAddSupplier" CssClass="btnadd" ToolTip="New Supplier"
                OnClick="lnkAddSupplier_Click"></asp:LinkButton>
            <asp:Button runat="server" ID="popupshowAccount" Style="display: none" />
        </div>
    </div>

Code behind

foreach (ListItem item in DdlSupplier.Items)
            {
                item.Attributes.Add("title", item.Text);
            }
            DdlSupplier.Attributes.Add("onmouseover","this.title=this.options[this.selectedIndex].title");

Clicking on lnkAddSupplier opens up a popup. After closing the popup tool tip is not visible for the dropdown.

Please help on solving this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:32:59+00:00Added an answer on June 7, 2026 at 8:32 pm

    Attributes won’t be saved in Viewstate and that’s why they will disappear across postbacks. Similar is the case with Custom Attributes.

    That’s why we have to use DropDownList Pre Render event to set attributes

    protected void DropDownList1_PreRender(object sender, EventArgs e)
    {
        foreach (ListItem item in DropDownList1.Items)
            item.Attributes.Add("title", "Something to test!!!!!!");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET DropDownList control that renders into a dropdown list (select HTML
Hi All I need a CheckBox Dropdown list control in asp.net i have seen
i have a dropdownlist control in asp.net which resides in a user control .The
In my web site I have one asp.net dropdown control. The length of value
I have following asp.net code but it gives error when I change dropdown selected
I am using Asp.net dropdownlist in one of my form ..I have two dropdown
I have a ASP.NET website and say it has 2 pages. I am displaying
Using ASP.Net MVC 1.0 I have a form with some input control on it.
In my ASP.NET applications, I have a server-side HTML select control. <select id=CompanyDropDown runat=server
We have a ASP.Net Calendar control, and in the DayRender event, we have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.