Torna al Thread
Protected Sub GridView2_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView2.RowUpdating
Dim SQLStr As String
Dim createSQLquery AS Boolean
Dim ColID as String
Dim str as String
dim strUser_NameSurname as string
dim strIdUser as string
'QUI CONTROLLO I CAMPI DELLA TABELLA SE VANNO BENE
createSQLquery = TRUE
ColId = "User_NameSurname"
if check_values_STRING(e, ColId, str, createSQLquery ) then
strUser_NameSurname = str
else
goto exit_1
End If
'
'.... etc,etc per tutti i campi
'
'**------**
exit_1:
'**------**
If createSQLquery
SQLStr = "UPDATE [User_Dati] " & _
"SET User_NameSurname=@User_NameSurname, " & _
" where UserID=@UserID "
SqlDataSource2.UpdateCommand = SQLStr
'SqlDataSource2.DataBind
Else
e.Cancel = True
End If
'--- istruzione di UPDATE l'ho provata anche come... ma non ha funzionato
' "SET User_NameSurname='" & strUser_NameSurname & "'" & _
' " where UserID='" & strUserID &"'"