Sunday, September 7, 2014
Not Downloaded Yet!!!
RadioButtonList listitem tooltip
In this tutorial, We are going to learn How to set RadioButtonList listitem tooltip with C# example
RadioButtonList is an asp.net list web server control. we can set a tool tip for radiobuttonlist control by setting a value to its built in property named ToolTip. but radiobuttonlist server control have no built in property to display different tool tip for each item.
ListItem.Attributes property get a collection of attribute name and value pair for the ListItem that are not directly supported by the class. we can add any css style name and value pair to this attribute collection by calling ListItem.Attribute.Add() method. Add() method have two arguments, first argument is a css style name and second argument is the specific style's value.
so that to display different tool tip on radiobuttonlist each item, we add an attribute to each list item. here we added a css title style with value to each list item object. as a result in a web browser radiobuttonlist control display different tool tip for each item.
Step 1: Create a ASP.NET empty Web Application
Step 2: Create a webform “Default.aspx” and write the following codes.
<%@ Page Language="C#" AutoEventWireup="true"%>
How to set RadioButtonList listitem tooltip with C# example
Step 3: Run the application or press the F5 Key on the keyboard. You will get the following output as below to set RadioButtonList listitem tooltip with C# example
so In this tutorial, we have learned How to set RadioButtonList listitem tooltip with C# example. Happy Coding!!!!
Download Source Codes