System.Web.UI.WebControls.ListItem Class
Information   Base Types   Related Resources

Represents a data item in a data-bound list control. This class cannot be inherited.

  • Namespace: System.Web.UI.WebControls
  • First seen in: .NET v1.0.3705
  • Last seen in: .NET v1.1.4322
  • Last changed in: .NET v1.0.3705
  • Assembly: System.Web.dll

  • System.Object
  • View this type on MSDN
  • View this type on WinFX 247
    Articles (46)Discussions (759)MembersRotorChanges
    Articles

    Page: 12
    A Small Data Class
    FLWS.com.au
    This is a small code sample to demonstrate how simply you can create an array and use it as the DataSource for a ListBox control. More than that though, I'd like you to pay close attention to the small Class called ListData that serves as a Data Class. I saw a Class similar to this one used in an example on MSDN, and, because I can never find anything twice on MSDN, thought that I'd better document it here on ShowUsYourCode.
    Adding a Default ListItem in a Databound Listbox in ASP.NET
    4Guys from Rolla
    In a previous article I showed how to use databinding to automagically populate an ASP.NET's listbox Web control with just a few lines of code. (If you've not already read the past article, be sure to do so now.) I've received a couple of feedback emails from folks since publishing the article asking how to add a default option to the listbox. That is, they want to add a listitem to the listbox, like: -- Please Choose an Option Below--. In this brief article we'll tackle this topic and more!
    Adding Blank Rows to a DataGrid
    DotNetJunkies
    In one application I had the requirement to add a blank row after every 10 rows in a DataGrid rather than use paging. There is no in-built way to do this with the DataGrid, but it can be easily done by modifying the DataTable that the DataGrid is bound to and by writing some code in the DataGrids ItemDataBound event. This how-to article will describe how it is done.
    Advanced Checkbox Validation Across n-Pages for the DataGrid Control
    DotNetJunkies
    In this article, Oliver shows how to select up to two records from a datagrid that can then be compared to generate a PDF document on the fly.
    An Introduction to Mobile Programming in C#
    C#Today
    With the expansion of the web away from traditional browsers, current technology has brought the internet into mobile devices. Microsoft has constantly improved its support to such devices, and the introduction of the .NET framework has taken this support a step further. With .NET we can program for a mobile device as a normal web page and the Common Language Runtime and .NET framework will take care of rendering the data in the appropriate format, i.e. as HTML for browsers, as WML for mobile phones, etc. In this article Niranjan Kumar introduces us to programming for Mobile devices using C# and ASP.NET pages. This is illustrated with a Stock List application that accesses a SQL Server database and lists available stocks on either a Mobile device or HTML browser.
    Application of the Cache Subsystem for Web Applications
    C#Today
    In this article, Eric Rhea explores two approaches to utilizing the caching system. First, he talks about how to make use of the cache subsystem from the web-form code. Then, he takes a look at exploring how to make use of the cache subsystem in the code behind. While doing this, he seeks three answers: (1) how to improve performance, (2) how to make use of similar techniques in both code areas, and (3) how to cache an object which is indeterminate in length and whose values you do not know in advance, and one which you cannot cache using the web-form directive.
    Ask the DotNetJunkies: Dynamically Populating An ASP.NET ListBox
    DotNetJunkies
    When dynamically populating a list box using listbox.items.add, asp.net generates the same string for the HTML tag OPTION's value and text. In the past, I would put a table key in the value while filling the HTML text with various information. What are methods for splitting the listbox attributes? The .net framework examples do not address this type of dynamic filling of the listbox. Thanks, Ken (your interview on MSDN was great)
    Ask the DotNetJunkies: Working with Properties and Data Types
    DotNetJunkies
    How do I change forecolor of Label programmatically? I have tried... lblTest.forecolor="green" but keeping getting "System.String cannot be converted to System.Drawing.Color" error. Any help would be appreciated. This is a good question because it gives me the opportunity to address some of the fundamentals of how the .NET Framework handles data types. In classic ASP a color name and a string didn't seem any different in that they were both string values. In .NET data types are much more important and much
    ASP.NET C# Disable/Enable ListItems
    The Code Project
    This article demonstrates how it is possible to disable/enable individual ListItems in a ASP.NET CheckBoxList Server Control.
    ASP.NET C# Disable/Enable ListItems
    The Code Project
    This article demonstrates how it is possible to disable/enable individual ListItems in a ASP.NET CheckBoxList Server Control.
    ASP.NET Developer's Cookbook Chapter 3: Custom Controls
    The Code Project
    The most common techniques in building custom controls in ASP.NET.
    ASP.NET Localization Part 1: CultureInfo
    DotNetJunkies
    The .NET Framework provides built-in mechanisms for localizing applications. ASP.NET internally uses Unicode and the String class of the .NET Framework also uses Unicode. The use of Unicode enables you to easily specify different encoding types for the response data sent to the client. While the .NET Framework will not translate your documents from the language they are written in to a different language, the built-in mechanisms will reconfigure output such as DateTime objects to their appropriate format.
    Building a CheckBoxList Validator Control - Part 2
    DotNetJunkies
    As promised, this week we will be going over how to add client-side JavaScript to a custom validator control. <b>But</b> last week I was asked a very interesting question. What validator control should I use to validate that a CheckBox was checked within a CheckBoxList? The anwser was simple, NONE. None of the validator controls in the .NET valiator control suite does this type of validation. So, in this article not only are we going to discuss how to add JavaScript validation control for client-side valida
    Building a CheckBoxList Validator Control - Part 2
    DotNetJunkies
    As promised, this week we will be going over how to add client-side JavaScript to a custom validator control. But last week I was asked a very interesting question. What validator control should I use to validate that a CheckBox was checked within a CheckBoxList? The anwser was simple, NONE. None of the validator controls in the .NET valiator control suite does this type of validation. So, in this article not only are we going to discuss how to add JavaScript validation control for client-side validation, but how to create a CheckBoxListRequiredFieldValidator control.
    Building a DataGrid with Add and Edit Features
    DotNetJunkies
    The DataGrid server control is one of the most widely used controls in ASP.NET-based projects to display data in a table form. When using a mixture of database- and manually-driven DropDownLists, placing them in a DataGrid can be confusing. In this tutorial, I'll focus on resolving this issue using an example of an expense entry and reporting system.
    Building ASP.NET Controls in VB .NET and HTML
    DotNetJunkies
    It is always nice to be able to drag and drop controls on to your Web Forms, but there are times when you need to control the situation a little better. In this how to, I will show you some tricks on how to build ASP.NET controls using Visual Basic .NET (VB .NET) and HTML. I will talk about four different controls: textbox, label, dropdown list, and button.
    Calendar Function
    The Code Project
    Function that returns a calendar in code-behind at run-time not a web-control but similar
    Checking FindByValue For Null in C#
    DotNetJunkies
    This How-To demonstrates how to check use FindByValue with a DropDownList, and react programmatically when the it does not find the specified value.
    Client/Server-side ASP.NET Credit Card Validation Control
    The Code Project
    Article discussing new version of ASP.NET Credit Card Validator, including both server and client-side checks and VS.NET designer support.
    Client/Server-side ASP.NET Credit Card Validation Control
    The Code Project
    Article discussing new version of ASP.NET Credit Card Validator, including both server and client-side checks and VS.NET designer support.
    Coloring items in a ListBox
    The Code Project
    This article describes the &quot;bug/feature&quot; in the ASP.NET ListBox.
    Connecting to Databases the ASP.NET Way
    DotNetJunkies
    This article demonstrate how to connect to databases using the three .NET Data Providers - SQL, OleDb, and ODBC - It has contains a page that demonstrates a performance comparison between the three and links to other performance comparisons.
    Create multilingual web pages very easy
    The Code Project
    Create multilingual web pages very easy without using localization and resources
    Creating and Consuming .NET Web Services in Five Easy Steps
    DotNetJunkies
    Dimitrios promises this article will have you creating and consuming a data driven .NET XML Web Service in no time flat with an example providing a list of suppliers to a given country. All in five quick and easy steps!
    Displaying Multiple Fields in DropDownList.Text Property
    DotNetJunkies
    This How-To demonstrates how to display multiple fields in the DropDownList's Text property - such as FistName and LastName.
    Ad
    MBR BootFX
    Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
     
     Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
    Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com