I have the standard search scenario: user enters search parameters and clicks the search button - results show up in the panel below. What I want to do is to control the visibility of the panel based on whether search results are available or not. I have tried to code my panel as follows, but I am getting a parse error at run time.
<asp:Panel ID="ResponsePanel" Visible="<%= Model != null %>" runat="server">
...
</asp:Panel>
The parse error I am getting is this:
Cannot create an object of type 'System.Boolean' from its string representation
'<%= Model != null %>' for the 'Visible' property.
How do I toggle the panel depending on the availability of the model?