using includes causes error

  • Thread starter Thread starter thersitz
  • Start date Start date
T

thersitz

Hi,

I am using include statements in my asp.net files as such:

<!--#include file="sideBarPartTwo.aspx" -->

doing so places an error in my design view of VStudio 2005 -- and then does
not allow me to see the page in design view -- it merely shows an "Error
Creating Control" box with the following error message,

"Content1:object reference not set to an instance of the object"

content1 refers to my <asp:Content ID="Content1"
ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> tag

The page views ok -- the includes show properly -- but it basically prevents
me from being able to work in design view. Any ideas why this occurs? thanks
 
thersitz said:
Hi,

I am using include statements in my asp.net files as such:

<!--#include file="sideBarPartTwo.aspx" -->

I recommend against using Server Side Includes. They're a holdover from
classig ASP. I would suggest using User Controls instead. It's a
straghtforward conversion.

John
 
Back
Top