slimshady Posted July 11, 2006 Posted July 11, 2006 I'm trying to add a "tooltip" or "onhoover" or something to the values in a drop down list. I want to have an explanation to each "row" in the drop down... Is this possible?! The drop down is created as a user control which I then use on my aspx page. Ascx page: <asp:ObjectDataSource ID="mObjectDataSource" runat="server" SelectMethod="SelectAll" TypeName="DB.MasterDao"> </asp:ObjectDataSource> CodeBehind: Public ReadOnly Property MasterDropDownList() As DropDownList Get Return mMasterDropDownList End Get End Property Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then BindControls() End If End Sub Private Sub BindControls() BindControl(mMasterDropDownList) 'other code End Sub Private Sub BindControl(ByVal pControl As DropDownList) With pControl Dim i As New ListItem i.Text = "All" 'The first item in drop down says "All" (if user wants to search for all) i.Value = 0 .Items.Clear() .Items.Add(i) If .SelectedIndex <> 0 Then .DataBind() End If End With End Sub I see that I can in the Sub BindControl set tooltip for pControl, but I don't get any results by for exmple writing .tooltip = "test". Anyone out there who knows how to do this? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.