Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

Load combos


Hello,

I have a list of entities (with properties Key and Description).

Which is the best manner of load dropdownlist with this list ?

1.  

ListaTiposInmueble tiposInmueble = bfll.ObtenerListaTiposInmueble();
                foreach (TipoInmuebleEntidad tipoInmueble in
tiposInmueble.TiposInmueble.Values)
                {
                    this.ddlTipoInmueble.Items.Add(new
ListItem(tipoInmueble.Fcitem, tipoInmueble.Valor.ToString()));
                }

2.

                //ListaTiposInmueble tiposInmueble =
bfll.ObtenerListaTiposInmueble();
                //if (tiposInmueble != null)
                //{
                //    this.ddlTipoInmueble.Items.Clear();
                //    this.ddlTipoInmueble.DataSource =
tiposInmueble.Elementos.Values;
                //    this.ddlTipoInmueble.DataTextField = "Fcitem";
                //    this.ddlTipoInmueble.DataValueField = "Valor";
                //    this.ddlTipoInmueble.DataBind();
                //}

Thanks in advance

--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net

2.

In many cases you can also do it in .aspx page without codebehind.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net

"Alhambra Eidos Kiquenet" <AlhambraEidosKique@discussions.microsoft.com>
wrote in message news:CF49AC24-091B-4A14-BAF5-8EABC0E75D36@microsoft.com...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc