| Welcome to Webforumz.com. |
|
Jan 21st, 2008, 17:30
|
#1 (permalink)
|
Join Date: Aug 2003
Location: Castle Rock, CO
Age: 36
Posts: 177
|
Including a File
I am working on a new website - mainly a layout. We will probably be using .NET for it (once we get through some of the legal stuff). I am wanting to do an include file. Looking through some of the previous posts, I see them talking about the web.config etc but I am not certain if that is what I really need to be messing with.
For example, in ASP you use something like - Code: Select all
<!--#INCLUDE FILE="includes/header.html" -->
so is there something comparable in .NET? Perhaps I should just do the layout in ASP if there is not something that comparable and then let the programmer do handle it
|
|
|
Jan 21st, 2008, 21:42
|
#2 (permalink)
|
|
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 21
Posts: 2,381
|
Re: Including a File
I'd use asp or php.
What is .net code anyway?
|
|
|
Jan 21st, 2008, 21:43
|
#3 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Including a File
It's ASP extended. You can code in C#, VB etc.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Jan 21st, 2008, 21:45
|
#4 (permalink)
|
|
Elite Veteran
Join Date: Sep 2006
Location: The Kingdom of Rabbits
Age: 21
Posts: 2,381
|
Re: Including a File
I code in VB all the time lol.
|
|
|
Jan 21st, 2008, 21:47
|
#5 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Including a File
In response to the original question.
You can use the method you said or the .NET way:
- Code: Select all
<%
Response.WriteFile ("Yourfile.inc")
%>
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Jan 21st, 2008, 22:30
|
#6 (permalink)
|
Join Date: Aug 2003
Location: Castle Rock, CO
Age: 36
Posts: 177
|
Re: Including a File
Thanks! - Code: Select all
<%
Response.WriteFile ("Yourfile.inc")
%>
did the trick! That will help me on a few other pages actually as well that I had been needing to include a few files in but needed the .aspx file extension.
Yeah, I know - I am supposed to be a "Visual Developer - ASP/ASP.NET" - but still think I missed the boat when it comes to .NET
|
|
|
Jan 21st, 2008, 22:42
|
#7 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Including a File
Yeah, I'm not too fussed on it either.
By the way, source was here.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Mar 11th, 2008, 20:08
|
#8 (permalink)
|
|
Junior Member
Join Date: Feb 2008
Location: Paris
Age: 31
Posts: 18
|
Re: Including a File
Well done.
|
|
|
Mar 12th, 2008, 03:27
|
#9 (permalink)
|
|
Section Manager - Design Forums
Join Date: Oct 2006
Location: Southampton
Posts: 214
|
Re: Including a File
won't mean squat if your host doesn't support server side includes. Won't be the first time I've seen great plans be shot down in smoke.
__________________
Jon Warner
Section Manager (Design)
|
|
|
| Thread Tools |
|
|
| 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
HTML code is Off
|
|
|
|
|
|