![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
20/10/2006, 12:18
|
| | Fecha de Ingreso: agosto-2006 Ubicación: en lima peru
Mensajes: 184
Antigüedad: 18 años, 5 meses Puntos: 0 | |
Saber si un dropdownlist ha sido modificado hola tengo el siguiente codigo donde recorro todos mis dropdownlist alguien podria decirme como decirle si ya esta seleccioando
Código:
Try
If Page.IsPostBack Then
' sqldemostracion.InsertCommand = "insert into encuesta(" & Cbo1.SelectedValue & ";" & 1 & ""
Dim a As Object = ""
For Each a In DIV1.Controls
If TypeOf a Is DropDownList Then
' If a¿? = ¿? Then
Label1.Text = "Seleccione sus 3 cursos"
Exit Sub
End If
End If
Next
Dim cn As New SqlConnection(sqldemostracion.ConnectionString)
Dim sql As String = "insert into encuesta(Id_curso,nivel) values(" & Cbo1.SelectedValue & "," & 1 & ")"
' Response.Write(sql)
Dim cmd As New SqlCommand(sql, cn)
cn.Open()
cmd.CommandType = Data.CommandType.Text
cmd.ExecuteNonQuery()
sql = "insert into encuesta(Id_curso,nivel) values(" & Cbo2.SelectedValue & "," & 2 & ")"
cmd.CommandText = sql
cmd.ExecuteNonQuery()
sql = "insert into encuesta(Id_curso,nivel) values(" & Cbo3.SelectedValue & "," & 3 & ")"
cmd.CommandText = sql
cmd.ExecuteNonQuery()
cn.Close()
Button1.Enabled = False
Response.Write("<script language=javascript> function cerrar() { window.close(); }")
End If
Catch ex As Exception
Response.Write(ex.Message)
End Try
|