Torna al Thread
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim nomeutente As Label = DirectCast(FindControl("GridView1:username"), Label)
Dim modifica As ImageButton = DirectCast(FindControl("GridView1:editbtn"), ImageButton)
Dim rispondi As ImageButton = DirectCast(FindControl("GridView1:answerbtn"), ImageButton)
'leggo il numero del thread
Dim th As Integer = HttpContext.Current.Request.QueryString("ID_thread")
'applico il filtro
titolo_label.FilterExpression = "ID_thread='" & th & "'"
thread.SelectCommand = "SELECT t.Id_utente, t.ID_thread, t.ID_msg, t.testo, t.data,a.UserName, a.UserImage, a.UserMessage FROM Forum_messaggi t JOIN aspnet_Users a ON t.Id_utente= a.UserId WHERE t.ID_thread=" & th.ToString()
'imposto i tasti per l'utente
'se l'utente è connesso ed ha creato il messaggio visualizzo il pulsante di modifica ma non quello di risposta
If User.Identity.IsAuthenticated = True Then
If nomeutente.Text = User.Identity.Name() Then
modifica.Visible = True
rispondi.Visible = False
End If
End If