Problems Including Files For URL redirect

  • Thread starter Will Chamberlain
  • Start date
W

Will Chamberlain

For the next couple of months I am hosting 2 domains with one host
(Brinkster). What I have done is setup a page called default.aspx and a
select case for SiteNameURL = Request.ServerVariables("SERVER_NAME").
The only way I can get this to work is to use Response.Redirect for one
of the domains. I can include a file (Index.aspx) just fine for domain
B. When I attempt to include a file for Domain B I get errors such as:

The Connection Property Has Not Been set
There can only be one page directive

These errors are so ambiguous that I don't even know where to start.
The Connection Property error happens when I use:

<!--#Include Virtual="/path/file.aspx"-->

I have also tried using Server.Transfer but end up getting red x's for
images, dead-end hyperlinks, and sometimes the page directive error.

I have been dealing with this for about 2 weeks and I have run out of
ideas. Thanks in advance.
 
J

Juan T. Llibre

You are getting
There can only be one page directive
because you are including a page which has a page directive
into another page which also has a page directive.

You should not include an aspx files into another aspx file.

Use user or custom controls for HTML content,
and compile your functions, if you have them, to an assembly.
 
W

Will Chamberlain

Thanks for the reply Juan. I will be able to test this later this
evening. Just to be sure, instead of including the file as a SSI I
should include it as a usercontrol?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top