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
String Compare returns 0 if the strings are equal. To evaluate for true change your comparison to = 0 rather than <> 0.
If String.Compare(string1, string2, StringComparison.InvariantCultureIgnoreCase) = 0 Then
If you envision performing such checks frequently to display different portions of a page you might want to break your pages up based on the different types (or levels) of users you expect and redirect them to a particular page upon login. Depending on how similar the pages are between users you'll likely find using master pages and/or user controls to be beneficial.