
17/10/2003, 17:04
|
| | Fecha de Ingreso: septiembre-2003
Mensajes: 96
Antigüedad: 21 años, 5 meses Puntos: 0 | |
Hola, nuevamente...
Ya lo hice y ya no obtuve ningun error, ahora mi problema es que cuando selecciono el "area" no me despliega los datos :(
He aquí mi código:
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="VB" runat="server">
Sub Display (Src As Object, E As EventArgs)
Dim MyCommand As SqlDataAdapter
Dim myConnection As New SqlConnection ("server=Poseidon; uid=sa; pwd=; database=COTIZADOR")
MyCommand = New SqlDataAdapter("select * from Curriculum where areainteres = '" & area.SelectedItem.Value & "'", MyConnection)
MyConnection.Open()
Dim DS As New DataSet()
MyCommand.Fill(DS, "Curriculum")
MyRepeater.DataSource = DS.Tables("Curriculum").DefaultView
MyRepeater.DataBind()
End Sub
</script>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<form runat="server">
<asp:dropdownlist ID="area" OnSelectedIndexChanged="Display" runat="server">
<asp:listitem Value="Sistemas">Sistemas</asp:listitem>
<asp:listitem Value="Consultoría">Consultoría</asp:listitem>
<asp:listitem Value="Administración">Administración</asp:listitem>
</asp:dropdownlist>
<ASP:Repeater id="MyRepeater" runat="server">
<HeaderTemplate>
<table width="765" style="font: 8pt verdana">
<tr style="background-color:DFA894">
<th width="47">ID</th>
<th width="123">ÁREA DE INTERÉS</th>
<th width="381">NOMBRE</th>
<th width="194">AÑOS</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="background-color:FFECD8">
<td><%# DataBinder.Eval(Container.DataItem, "id") %></td>
<td><%# DataBinder.Eval(Container.DataItem, "areainteres") %></td>
<td><%# DataBinder.Eval(Container.DataItem, "nombre") %></td>
<td><%# DataBinder.Eval(Container.DataItem, "anos1") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</ASP:Repeater>
</form>
</body>
</html>
Molto grazzie de antemano... |