Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Tooltip for asp.net dropdownlist not Wroking for Select 2nd time Select.only Work 1st time Select.


This is My code

     protected void dropdownConsignee_DataBound(object sender, EventArgs e)
        {
       
                string CustomerName;
                DataSet Ds = new DataSet();
                String cusCode = txtCusCode.Text.Trim();
                Ds = BAL.HAWB_Outbound.conSigneeList(cusCode);


                int ItemCount = dropdownConsignee.Items.Count;
                for (int i = 0; i < ItemCount; i++)
                {
                    dropdownConsignee.Items[i].Attributes.Add("Title", Ds.Tables[0].Rows[i]["Address"].ToString());
                }
                dropdownConsignee.Items.Insert(0, new ListItem("Select", "Address"));
                dropdownConsignee.SelectedItem.Selected = false;
                dropdownConsignee.Items.FindByText("Select").Selected = true;


        }
Posted
Comments
Schatak 26-Mar-14 7:32am    
where you are specifying Tool-tip?
Christian Graus 27-Mar-14 21:46pm    
I don't see any code to set a tooltip here. I also see nothing to do with SQL Server

See below code
XML
<asp:DropDownList ID="DropDownList1" runat="server" ToolTip="Set Your Tooltip"></asp:DropDownList>
 
Share this answer
 
 
Share this answer
 
while you writing a code

type this

dropdown1.tooltip="tooltip name";
 
Share this answer
 
Just write the tool tip property directly instead of title with confident coding
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900