I am using a RadListBox and I would like to find if the items that are selected in this list when clicking on a search button. However, when doing the following I have no item selected (the Label text is = 0) and I do not see why?
In my Search.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search.ascx.cs" Inherits="Controls.Search.Search" %>
<telerik:RadListBox ID="List1" runat="server" SelectionMode="Multiple" CssClass="rListBx"/>
In my Search.ascx.cs:
Label.Text = List1.SelectedItems.Count().ToString();
My Search_Click function is in a partial class that inherits from System.Web.UI.UserControl
In my Search.ascx.designer.cs
protected global::Telerik.Web.UI.RadListBox List1;
An idea about what I am doing wrong here?