I am trying to compare a session variable to another string so that i can enable or disable image buttons. I am using asp.net vb with a sql2005 express backend
P
this is works!
ImageButton1.Enabled = Not Session("UserName") Is Nothing AndAlso Session("UserName").ToString.ToLower.Trim.Equals("username")
ImageButton2.Enabled = Not Session("UserName") Is Nothing AndAlso_ Session("UserName").ToString.ToLower.Trim.Equals("username")