473,513 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

general question

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

Nov 19 '05 #1
5 955
Andrew wrote:
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
Nov 19 '05 #2
Fx
Hi Andrew

I think what you're looking for are user controls

If you add a user control to your project add some code/HTML/text then you
can drag and drop the user control (the .ASCX file) on to any .ASPX page in
your project. It will appear as a grey box in the designer but once you run
it it will appear.

For more on user controls
http://www.dotnetjunkies.com/quickst...bpagelets.aspx

Cheers

Felix
Nov 19 '05 #3
thanks

"Fx" wrote:
Hi Andrew

I think what you're looking for are user controls

If you add a user control to your project add some code/HTML/text then you
can drag and drop the user control (the .ASCX file) on to any .ASPX page in
your project. It will appear as a grey box in the designer but once you run
it it will appear.

For more on user controls
http://www.dotnetjunkies.com/quickst...bpagelets.aspx

Cheers

Felix

Nov 19 '05 #4

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
Andrew wrote:
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

Nov 19 '05 #5
> 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.

"Andrew" <An****@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com... 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

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
1985
by: John Salerno | last post by:
After my last post, I thought of another question as a result of the following: ------------------------------ Mike Meyer wrote: > John Salerno <johnjsal@NOSPAMgmail.com> writes: > > >>So...
3
1465
by: JezB | last post by:
What's the generally accepted approach for using Styles and Stylesheets in a web application based on .aspx files, Web Controls, User Controls, and code-behind modules (c# in my case)? Most style...
2
1415
by: ZorpiedoMan | last post by:
I'm new to the world of sockets, and this question is not VB specific: If multiple clients access the same server on the same port, and the server is set up to do some async communication, does...
105
5231
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does...
1
2358
by: Mark Fink | last post by:
Hi there, unfortunately I am new to Jython and my "Jython Essentials" book is still in the mail. I looked into the Jython API Doc but could not find the information. I am porting a Python...
0
1497
by: Yong | last post by:
I'm not getting any reply to my previous thread so I'm stating a new one. I get a General Network Error due to my SqlCommand object not having a big enough CommandTimeout to complete very long...
4
2295
by: Viviana Vc | last post by:
Hi all, I've read the WindowsVistaUACDevReqs.doc documentation and I have done different small tests on Vista to understand the bahaviour and now I have a few questions. 1) If I create a...
2
4034
by: sharan | last post by:
Hello Friends I have a problem in Data Structure (In C) i want to emplement a General tree having three child nodes of each parent node ...please send me any simple Example( code) by which i can...
2
168
by: SpotNet | last post by:
Scott M. Have your experiences shown you that programmers may give the best computer advice, analysis, and solutions even at the worst of times, for a PC user? ;~D Haven't crossed many Network...
3
1601
by: =?Utf-8?B?Ymxi?= | last post by:
I am posting to the general discussion group - but I cannot find my postings... or replies...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.