Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET and includes

Reply
Thread Tools

ASP.NET and includes

 
 
=?Utf-8?B?RGFjdW5h?=
Guest
Posts: n/a
 
      10-19-2004
I'm a begginer at ASP.NET having developed for several years in ASP and
VBScript.

I am developing a website where I'm componetazing the header, content
section and the footer. Each secion is a different page.

My codes looks like something like this

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
Inherits="LDOL._default" %>
<html>
<!--#include file="header.aspx"-->
default page content here...
<!--#include file="footer.aspx"-->
</html>

My dilema comes when I have different functions in the header.vb page (such
as getting metatags from a db) that cannot be seen because the default.aspx
page looks for the function in the default.vb page instead. It returns an
error "Function not declared". I've tried to find a way where I can have all
my common functions in a centrailzed place (like the global.asax) but have
not been successfull. Am I trying to make ASP.NET do something that was a
shortcoming of ASP? That is what is seems to me...
--
Thank you for your help
--
Thank you for your help
 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      10-19-2004
Yeah... once was enough... and no.. it doesn't support includes like ASP

"Dacuna" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm a begginer at ASP.NET having developed for several years in ASP and
> VBScript.
>
> I am developing a website where I'm componetazing the header, content
> section and the footer. Each secion is a different page.
>
> My codes looks like something like this
>
> <%@ Page Language="vb" AutoEventWireup="false"

Codebehind="default.aspx.vb"
> Inherits="LDOL._default" %>
> <html>
> <!--#include file="header.aspx"-->
> default page content here...
> <!--#include file="footer.aspx"-->
> </html>
>
> My dilema comes when I have different functions in the header.vb page

(such
> as getting metatags from a db) that cannot be seen because the

default.aspx
> page looks for the function in the default.vb page instead. It returns an
> error "Function not declared". I've tried to find a way where I can have

all
> my common functions in a centrailzed place (like the global.asax) but have
> not been successfull. Am I trying to make ASP.NET do something that was a
> shortcoming of ASP? That is what is seems to me...
> --
> Thank you for your help
> --
> Thank you for your help



 
Reply With Quote
 
 
 
 
=?Utf-8?B?QWJoaXNoZWsgUGF0ZWw=?=
Guest
Posts: n/a
 
      10-19-2004
Yes CJ Taylor is right but you can use this if you use inline asp rather than
code behind. There is also another .NET way of doing this. You can create a
web user control for both header and footer, put all you code and gui in
there and just insert the user control on your default.aspx page. This way
you can access the functions/methods in your header(user control) by <user
control name>.<function/method name ()>. This is the way that you are
intended to do this in asp.net



"Dacuna" wrote:

> I'm a begginer at ASP.NET having developed for several years in ASP and
> VBScript.
>
> I am developing a website where I'm componetazing the header, content
> section and the footer. Each secion is a different page.
>
> My codes looks like something like this
>
> <%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb"
> Inherits="LDOL._default" %>
> <html>
> <!--#include file="header.aspx"-->
> default page content here...
> <!--#include file="footer.aspx"-->
> </html>
>
> My dilema comes when I have different functions in the header.vb page (such
> as getting metatags from a db) that cannot be seen because the default.aspx
> page looks for the function in the default.vb page instead. It returns an
> error "Function not declared". I've tried to find a way where I can have all
> my common functions in a centrailzed place (like the global.asax) but have
> not been successfull. Am I trying to make ASP.NET do something that was a
> shortcoming of ASP? That is what is seems to me...
> --
> Thank you for your help
> --
> Thank you for your help

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modules and Classes, Includes and Extends Alpha Blue Ruby 0 01-30-2010 11:42 PM
Includes and codebehind page =?Utf-8?B?RGFjdW5h?= ASP .Net 1 10-19-2004 06:49 PM
Includes and codebehind page =?Utf-8?B?RGFjdW5h?= ASP .Net 2 10-19-2004 06:49 PM
ASP.NET and includes =?Utf-8?B?RGFjdW5h?= ASP .Net 0 10-19-2004 04:29 PM
WEBBOT includes and .ASPX Tor Nordahl ASP .Net 0 11-04-2003 09:49 PM



Advertisments