..


Sponsored Links

ListBox

The family of the ListBox Web Server Control ASP.NET selectbox to create a multi-option (in fact a listbox) managed by the server side. NET Framework.

Let's see the list of properties of the ListBox:

  • Rows - number, specifies the number of lines from which the listbox must be made.
  • SelectionMode - specifies whether or not the listbox to be multi-option, respectively, through the Single and Multiple values.
Runat attribute is always applied (set to "server") to allow. NET Framework to recognize it as a server-side object.

Let's see a simple example:





 <script runat="server">







 Sub Example (Sender As Object, e As EventArgs)



    



 End Sub







 </ Script>









 <form runat="server">







 <asp:ListBox id="Colori" rows="3" runat="server">







 <asp:ListItem> Red </ asp: ListItem>







 <asp:ListItem> Yellow </ asp: ListItem>







 <asp:ListItem> Green </ asp: ListItem>







 <asp:ListItem> Blue </ asp: ListItem>







 </ Asp: ListBox>







 <asp:Button Text="Clicca qui" OnClick="Esempio" runat="server" />







 <br> <asp:label id="Testo" runat="server" />







 </ Form>



In the same category ...
E-Learning
ASP (Advanced) ASP (Advanced)
Full course for creating dynamic Web sites. From 39 €.
ASP.NET (Course) ASP.NET (Course)
Full course for building Web applications from 49 €.
SQL and Database (Course) SQL and Database (Course)
Create and manage relational databases. From 39 €.
Sponsored Links