27.06.2014 Views

INFORMATICA MEDICA

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Esempio di procedura di convalida<br />

<br />

Sub Convalida(src As Object, e As EventArgs)<br />

If Validazione(NomeUtente.Value, Password.Value) Then<br />

FormsAuthentication.RedirectFromLoginPage<br />

(NomeUtente.Value, False)<br />

Else<br />

Messaggio.InnerText = "Utente non autorizzato!"<br />

End If<br />

End Sub<br />

<br />

La funzione booleana validazione è specifica del<br />

programma ed eventualmente accede a un DB per<br />

controllare le credenziali. Il metodo<br />

RedirectFromLoginPage vuole due parametri: il nome<br />

utente per i successivi accessi e un valore booleano<br />

sulla persistenza o meno del cookie generato

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!