Partial Public Class _Default Inherits System.Web.UI.Page Public Property Sql1Tally As Integer = 0 ... Protected Sub SqlDataSource1_Selected(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SqlDataSource1.Selected Sql1Tally = e.AffectedRows End Subalthough i get the correct tally from e.AffectedRows it does not pass it to the Sql1Tally. when I check that property/variable in another function in VB.net it always returns 0.