general question

G

Guest

In asp I could attach this tag as example below to join asp pages together in
a single page.

<!-- File: header1.html -->

<!-- File: footer1.html -->

Is it possible to do this in asp.net ? If so, how do I do it ?

TIA. Cheers.
Andrew
 
H

Hans Kesting

Andrew said:
In asp I could attach this tag as example below to join asp pages
together in a single page.

<!-- File: header1.html -->

<!-- File: footer1.html -->

Is it possible to do this in asp.net ? If so, how do I do it ?

TIA. Cheers.
Andrew

I'm not certain that it is really impossible, but the *recommended* way
is to use Web User Controls (ascx files) for "standard blocks".

You can then design a header (or footer or other block) in a separate file,
*including* code-behind. Then you can drag this control onto the aspx
page (or even another ascx).

Hans Kesting
 
T

tom pester

That include file syntax is still supported.

User control's are the more asp.NET way to do it but you don't have too.

HTH

Cheers,
Tom Pester
 
K

Kevin Spencer

In asp I could attach this tag as example below to join asp pages together
in
a single page.

<!-- File: header1.html -->

<!-- File: footer1.html -->

Is it possible to do this in asp.net ? If so, how do I do it ?

First, it is not possible to do what you described using HTML comments,
which is what those are. The only way to "join asp pages together in a
single page is by using server-side includes.

If that is what you're asking about, the answer is, yes, it's possible, but
breaks the ASP.Net object-oriented programming model.

Bottom line is, if you want to program procedurally, use ASP. If you want to
use ASP.Net, learn object-oriented programming, and learn the ASP.Net OOP
way of developing web applications. ASP will continue to be supported for
many years to come. ASP.Net is quite a learning curve to surmount, and is
well worth the effort, but you must be willing to make the effort to use it
correctly, or you will be very disappointed in the long run.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top