Torna al Thread

Protected Sub ApprovaSingolo_Click(ByVal sender As Object, ByVal e As System.EventArgs) 'Dim RepeaterC As Repeater 'RepeaterC = CType(Page.FindControl("Repeater1"), Repeater) //si ma quale page? Dim cnn As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString2").ConnectionString) Dim UpdateCommand As SqlCommand = New SqlCommand() UpdateCommand.Connection = cnn Dim sql As String sql = "Update tbl_utenti Set status_id = '5' WHERE id_utente =" & getidUtente UpdateCommand.CommandText = sql Try cnn.Open() UpdateCommand.ExecuteNonQuery() Catch ex As Exception Response.Write(ex.ToString()) Finally cnn.Close() End Try 'RepeaterC.DataBind() End Sub
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5