Include page ASP VB.net can't access function

  • Thread starter Thread starter Jonathan
  • Start date Start date
J

Jonathan

Hi

I have a small top navigation bar that is an 'include page' on my other aspx
pages.

The nav bar is navbar.aspx and has a little bit of asp.net code embedded in
it that displays 'Logged in as: name'. The function in it, GetLoginName,
works fine when I preview the page in IE by itself. However, when I preview
index.aspx (the homepage) it comes back with a .Net error that:

'GetLoginName' is not declared.

I don't have Visual Studio, I am just using Frontpage.

Any thoughts appreciated.
 
This is not how ASP.Net works. That's the biggest problem to start with.

First, ASP.Net is event driven, which is very different then classic ASP
which is just interpreted and spit out to the browser at run time. ASP.Net
has a mechanism called User Controls (the .ascx files). These can be
embedded within an ASP.Net page. That may be more what you need. Take a look
a the ASP.Net quickstarts for information on creating and embedding user
Controls.
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/userctrl/default.aspx

You also may want to check out Microsoft's Visual Web Developer Express.
It's free and works very nicely with ASP.Net. You can download the express
line of Visual Studio apps here: http://www.microsoft.com/express/

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 
Back
Top