Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/08/2009, 13:43
walterMillan
 
Fecha de Ingreso: agosto-2009
Mensajes: 1
Antigüedad: 14 años, 8 meses
Puntos: 0
Exclamación Cargar un SELECT desde Stored Procedure

hola, tengo la siguiente consulta, tengo una pagina en asp.Net que usa controles de HTML, entre ellos uso SELECT y BUTTON.

Mi duda es cargar un Combo SELECT desde un Stored procedure, El SP es una simple consulta que me llenara los combos que necesito..
Dejo el codigo HTML y el de la funcion de Javascript que arma parte de la tabla HTML

/* ASP.NET */

<table width="70%" id="tEncabezadosModulosPerfiles" border="1">
<tr>
<th style="width:40%">
<asp:Label ID="LblTitleModulos" runat="server"Text="Módulos">

</asp:Label>
</th>

<th style="width:40%">
<asp:Label ID="LblTitlePerfiles" runat="server" Text="Perfiles">

</asp:Label>

</th>
<th style="width:20%">
<asp:Label ID="LblTitleAccion" runat="server" Text="Accion"></asp:Label>
</th>
</tr>
</table>
<table width="70%" id="tModulosPerfiles" border="1">
<!-- La Dejo vacia para agregar filas dinamicamente con insertRow()

-->
</table>

/* JavaScript */

function insertRow()
{
if(i != MAXROW)
{
var x = document.getElementById('tModulosPerfiles').insert Row(0);
var w = x.insertCell(0);
var y = x.insertCell(1);
var z = x.insertCell(2);
x.id = 'Row' + i;
i++;
w.innerHTML = " <td style='width:40%'> <select id='SelectModulo'>
<option>Opcion1</option><option>Opcion2</option>
<option>Opcion3</option><option>Opcion4</option>
</select> </td> ";
y.innerHTML = " <td style='width:40%'> <select id='SelectPerfil'>
<option>Opcion4</option><option>Opcion2</option>
<option>Opcion3</option><option>Opcion4</option>
</select> </td> ";
z.innerHTML = " <td style='width:20%'> <input type='button'
value='Mostrar/Ocultar' onclick='javascript:displayRow(\"" +
x.id + "\");'> </th> ";
}
else
alert('Se supero la cantidad de filas permitidas.');
}


Desde ya muchas gracias.