Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-19-2012, 06:13 PM   PM User | #1
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
showing only html content from #included file

ok so I want to deploy a new default.asp to all of my web site's sub pages ( department pages)

I dont want admins to edit default.asp directly

in each folder Im goign to include sidebar.asp and mycontent.asp

I wantsidebar.asp and mycontent.asp to be full fledged documents including doctypes and css references.


My question , is it possible, in this scenario, to use includes to display the html content only of the included files? - meaning how can i strip everything but the contents of the <body> element when including sidebar.asp and mycontent.asp?

- I think you can do this in php, I jsu have no idea what this method is called so google didnt help much
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 11-19-2012, 06:49 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
nevermind I found it, but as it turns out this isnt a good way to go for this purpose anyhow.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 11-19-2012, 08:08 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,247
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
So what did you go with?

I would do it by breaking up the files.

So, for example, I might have:
sidebar-header.asp
sidebar-body.asp
sidebar-footer.asp

And then sidebar.asp simply #include's those 3 files. Whereas a page that needs only the body of the sidebar #include's sidebar-body.asp.

And so on.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:47 AM.


Advertisement
Log in to turn off these ads.