You're better off doing a placeholder approach:
<asp:PlaceHolder ID="ph1" runat="server" Visible='<%# GetSearchValue("ClassName").ToString().Equals("your.classname") %>'>
// do work here
</asp:PlaceHolder>
<asp:PlaceHolder ID="ph2" runat="server" Visible='<%# !GetSearchValue("ClassName").ToString().Equals("your.classname") %>'>
// do work here
</asp:PlaceHolder>