The items that you would need to modify in the CheckBoxList are private,
so they can't be manipulated. If this is a absolute must-have, you can
resort to modifying the rendered output of the control to do what you
want.
Add this class:
Public Class ChkboxListWithMouseOver
Inherits CheckBoxList
Protected Overrides Sub Render(ByVal writer As
System.Web.UI.HtmlTextWriter)
Dim html As String
Dim sw As New IO.StringWriter
Dim capture As New HtmlTextWriter(sw)
MyBase.Render(capture)
html = sw.GetStringBuilder.ToString
html = html.Replace("type=""checkbox""", _
"type=""checkbox"" onmouseover=""alert('you moused
over.');""")
writer.WriteLine(html)
End Sub
End Class
Create a page with the control:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="TestPage.aspx.vb" Inherits="**YOURPROJECT**.TestPage"%>
<%@register tagprefix="cb" assembly="**YOURPROJECT**"
namespace="**YOURPROJECT**" %> <html>
<body>
<form id="Form1" method="post" runat="server">
<cb:ChkboxListWithMouseOver Runat=server ID="chkList" />
</form>
</body>
</html>
(**YOURPROJECT** is the name of your project. You must replace this
value. If you are using namespaces, edit accordingly.)
Hope this helps.
--
----
700cb Development, Inc.
http://www.700cb.net
..NET utilities, developer tools,
and enterprise solutions
"=?Utf-8?B?VmlkZHM=?=" <Vi***@discussions.microsoft.com> wrote in
news:83**********************************@microsof t.com:
Hi ALL,
Can any one give me a solution to handle mouse over event of each of
the Check Box Control in a CheckListBox Control.
Thanks in advance
Regards
Vidds