@Edited after Mark's answer.
I have a ascx control where I have defined some variables.
<%
var showFilters = RenderingParameters.ShowFilters;
var minimizeCardHeight = RenderingParameters.MinimizeCardHeight;
var numberOfProfiles = 0;
%>
<sc:EditFrame ID="editContributors" runat="server" Title="Contributors Area" Buttons="/sitecore/content/Applications/WebEdit/Edit Frame Buttons/Test Button">
<div class='test'>
<% if(minimizeCardHeight) { %>
<div class="divider"></div>
<% } %>
</div>
</sc:EditFrame>
Now, in visual studio there is no error shown for any variables but when I publish the code and run the page in Experience Editor, a compilation error is thrown
CS0103: The name 'minimizeCardHeight' does not exist in the current context
Please let me know what I am doing wrong here.