Gip

Page 92

scmdKlas.Connection = cnnConnection scmdKlas.CommandText = "SELECT Algemeen, Raam, Hulp FROM HJStblLeerplan WHERE (Klas = @Klas) ORDER BY Algemeen" scmdKlas.Parameters.AddWithValue("@klas", SqlDbType.NText) scmdKlas.Parameters("@Klas").Value = ddlKlas.SelectedValue

Try 'openen connectie cnnConnection.Open()

'datareader aanpassen aan sqlcommand sdrKlas = scmdKlas.ExecuteReader(CommandBehavior.CloseConnection)

'terwijl lezen, toevoegen aan dropdownlist Do While sdrKlas.Read 'alle items toevoegen For i = 0 To 2 Dim strLijn As String = String.Empty strLijn = sdrKlas.Item(i).ToString ' lstDoel.Items.Add(strLijn) Next Loop

'sluiten connectie en reader sdrKlas.Close() cnnConnection.Close() Catch ex As Exception End Try End Sub

Protected Sub btnReturn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReturn.Click Response.Redirect("Homepage.aspx") End Sub

Protected Sub btnAfmeld_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAfmeld.Click Session.Clear() Response.Redirect("Default.aspx") End Sub

GIP 2010 - 2011

89


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.