i have a default.aspx
and a sidebar.aspx
i included the sidebar in my default by :
<!--#include file="../sidebar.aspx"-->
it included successfully without any error i used this code in my sidbar file :
<% if (True) { %>
<div class="left-box">
....
</div>
<% } %>
it works fine when i refresh the page @ development server but vs 2010 shows compile error :
Error 25 End of statement expected. C:\Users\user\Documents\Visual Studio 2010\WebSites\WebSite2\sidebar.aspx 6
Error 24 'If' must end with a matching 'End If'. C:\Users\user\Documents\Visual Studio 2010\WebSites\WebSite2\sidebar.aspx 6
Error 26 Syntax error. C:\Users\user\Documents\Visual Studio 2010\WebSites\WebSite2\sidebar.aspx 22
UPDATEEEEEEEEEEEEEEE ! -> at top of my default.aspx is -> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> and then i included my sidebar.aspx .... i dont know why sidebar run as VB ... i didnt use any page language at top of this file ... and it should use the default.aspx language