Postagens

Mostrando postagens com o rótulo System.Collections.Generic

Utilizando Dictionary no DropDownList

1: Dictionary< string , int > mes = new Dictionary< string , int >(); 2: mes.Add( "Janeiro" , 1); 3: mes.Add( "Fevereiro" , 2); 4: ... 5: ddlMes.DataSource = mes; 6: ddlMes.DataTextField = "Key" ; 7: ddlMes.DataValueField = "Value" ; 8: ddlMes.DataBind();