Number of Items to be shown in a Drop Down List using C# .net

see07

Regular
Joined
Apr 16, 2004
Messages
78
Location
Mexico City
I am using a Drop Down List in a web form. How can I specify the number of items to be shown? This is because I have so many items in Drop Down List and I want to show only 10 items.
I’ll appreciate your help.
 
Finally I got the solution:
The code is:
if(!Page.IsPostBack)
{
ddlDia.Attributes["onmouseover"] = "javascript:ddlDia.size = 10;";
}
 
Back
Top