In vb section of asp.net page i have this code. The scope is to retrieve the identity value of inserted row.
If ViewState("IdAttivita") = 0 Th