Retroceder   Foros del Web > Programación para sitios web > .NET

Respuesta
 
Herramientas Desplegado
Antiguo 03-nov-2004, 07:03   #1 (permalink)
carlostapia ha deshabilitado el karma
 
Fecha de Ingreso: septiembre-2004
Mensajes: 141
porque no se llena el dropdown de la DB

hola miren arme este codigo, todo lo demas me anda, super, ya hice mis salidas de datos ahora quiero tenr un menu para poder enviar los paramatros de esta forma traer los datos que el cliente quiere
adjunto el codigo alguin me puede decir porque el dropdown aparece vacio en pantalla?? si se supone que el dataset esta lleno?? de los datos de la base de datos

************CODIGO ************************
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicK eyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="DataSet1"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING_ConnectionStr") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABASETYPE_ConnectionStr") %>'
CommandText='<%# "SELECT * FROM dbo.Profile WHERE Receptor = @Receptor" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@Receptor" Value='<%# IIf((Request.QueryString("Receptor") <> Nothing), Request.QueryString("Receptor"), "") %>' Type="VarChar" />
</Parameters>
</MM:DataSet>
<MM:DataSet
id="DataSet2"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING_ConnectionStr") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABASETYPE_ConnectionStr") %>'
CommandText='<%# "SELECT * FROM dbo.Profile WHERE Proveedor = @Proveedor ORDER BY ID ASC" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@Proveedor" Value='<%# IIf((Request.QueryString("Proveedor") <> Nothing), Request.QueryString("Proveedor"), "") %>' Type="VarChar" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form method="post" runat="server">
<asp:DropDownList BackColor="#FFBF00" DataSource="<%# DataSet1.DefaultView %>" DataTextField="ID" DataValueField="ID" ForeColor="#D6D6CE" ID="DropDownList1" runat="server" value="comicrom"></asp:DropDownList>
<p>&nbsp;</p>
</form>
</body>
</html>
carlostapia está desconectado   Responder Citando
Antiguo 03-nov-2004, 08:52   #2 (permalink)
carlostapia ha deshabilitado el karma
 
Fecha de Ingreso: septiembre-2004
Mensajes: 141
alguen que sea seco y me diga prque no logro hacer que se cargue el dropdown
carlostapia está desconectado   Responder Citando
Antiguo 03-nov-2004, 12:27   #3 (permalink)
Moderador
RootK llegará a ser famoso muy prontoRootK llegará a ser famoso muy pronto
 
Avatar de RootK
 
Fecha de Ingreso: noviembre-2002
Ubicación: México D.F
Mensajes: 7.527
Enviar un mensaje por MSN a RootK
Te falta hacer un databind sobre tu dropdowlist.

Cita:
DropDownList1.DataBind()
Te recomiendo hacer las cosas a mano porque el code del wizard que te generó el dreamweaver (lo digo por tu código) está muy feo y te puedes ahorrar muchas partes para que quede mejor, es solo una opinión.

Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .
RootK está desconectado   Responder Citando
Antiguo 03-nov-2004, 14:21   #4 (permalink)
carlostapia ha deshabilitado el karma
 
Fecha de Ingreso: septiembre-2004
Mensajes: 141
compadre , me podrias dar un poko mas de ayuda , como por ejmplo la linea que me dices,debo agregarla sobre el drodown , solamente o deo hacer algo mas????
carlostapia está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 23:41.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93