M
Mark Fitzpatrick
Not like this. Include file processing is done BEFORE any script on the page
is run. It needs to be becuase most include files contain code that needs to
be part of the page.
In ASP.Net however, you do have lots of other options. For example,
encapsulating the content in a user control then adding the control to the
page, or a placeholder in the page like
if(condition1)
myPlaceholder.controls.add(myControl1);
else if (condition2)
myPlaceholder.controls.add(myControl2);
etc...
There are tons of different ways to do this, but SSI is not the way to
go if you need conditional includes because the include is always before any
script that can be used for conditional programming.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
is run. It needs to be becuase most include files contain code that needs to
be part of the page.
In ASP.Net however, you do have lots of other options. For example,
encapsulating the content in a user control then adding the control to the
page, or a placeholder in the page like
if(condition1)
myPlaceholder.controls.add(myControl1);
else if (condition2)
myPlaceholder.controls.add(myControl2);
etc...
There are tons of different ways to do this, but SSI is not the way to
go if you need conditional includes because the include is always before any
script that can be used for conditional programming.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage