migrating to .net (include statements)

M

mglover

i have a .html page that uses include statements for a header and
footer that i have to rebuild in .net (.aspx pages)

i am very new to .net and i do not know how if .net supports include
statements. can anybody help? i tried putting the include
statements in the html but the neither the header nor the footer show
up
 
C

Curt_C [MVP]

most of the time users with ASP.NET will convert their .include files to
User Controls. Then just plop it on your page(s).
 
M

mglover

ok i've made my include statements into .ascx files and they are
working fine. in fact, everything looks great, but the information
in the .aspx pages lays right on top of the user controls...

how do i orient the .aspx pages to fit around the user controls (ie
under and to the right of the header, and above the footer)? i could
manually move all the elements so that they fit, but then i might as
well just build the header right into all the pages...

(the include statements from the old, html pages had a table built
right into them where the pages loaded to avoid this. my new
"header"/user control also has this, if this helps)

could you guys please help? i appreciate all the help so far!
 
C

Curt_C [MVP]

what most of us do is somethign like what you said. Every page has this.

<table>
<tr>
<td colspan=2><header_here></td>
</tr>
<tr>
<td><left_menu></td>
<td>Page Info Goes Here</td>
</tr>
<tr>
<td colspan=2><footer_here></td>
</tr>
</table>

The controls you created for header/footer/menu are dropped onto each page
but you only have them in one location for modifying.
 
W

wh1974

Try taking a look in the document at 'web usercontrols'.

The idea is that you create a .ascx file which holds the page header and
then include this in your .aspx page.

Wayne.
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top