Partial Class admin_user_view Inherits System.Web.UI.Page Private mintUserID As Integer Private mintPersonID As Integer Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init mintUserID = Int32.Parse(Request.QueryString("urid")) End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender Dim objUser As GabaBit.BOL.User = GabaBit.BOL.User.GetUserByUserID(mintUserID) If Not objUser Is Nothing Then mintPersonID = objUser.PersonID If objUser.IsActive Then btnAward.Visible = True btnAward.PostBackUrl = String.Format("award.aspx?urid={0}", mintUserID) btnDeactivate.Visible = True btnDeactivate.PostBackUrl = String.Format("deactivate.aspx?urid={0}", mintUserID) btnActivate.Visible = False Else btnAward.Visible = False btnActivate.Visible = True btnActivate.PostBackUrl = String.Format("activate.aspx?urid={0}", mintUserID) btnDeactivate.Visible = False End If With grdDemos .DataSource = Demo.GetAllDemos .DataBind() End With End If End Sub Protected Sub grdDemos_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdDemos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim objDemo As Demo = CType(e.Row.DataItem, Demo) Dim objlblValue As Label = CType(e.Row.FindControl("lblValue"), Label) Dim objDemographic As Demographic = Demographic.GetDemographicByPersonID(mintPersonID, objDemo.DemoID) If Not objDemographic Is Nothing Then objlblValue.Text = objDemographic.DisplayValue End If End If End Sub End Class