Home » 2012 » August (Page 2)

Archive for August, 2012

Form control state in code behind

On page load event we define button css properties Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ‘define control css ValidatUser.Attributes.Add(“class”, “btnSubmit”) vUsername.Attributes.Add(“class”, “txtBox”) ‘on post back page we change the state of control If Page.IsPostBack Then ‘hide validate button ValidateUser.Visible = False ‘disable textbox vUsername.Enabled = False End If End […]