ASP to ASP .NET BC30289 Include files

  • Thread starter Marcel Balcarek
  • Start date
M

Marcel Balcarek

I am converting an ASP page to ASP .NET.

The original has the following:
#INCLUDE FILE="logAction.asp"

The included file holds some commonly used methods. When I rename it to
aspx files and run I get the following error on the first function
definition in the include file:

BC30289: Statement cannot appear within a method body. End of method
assumed.

on:
Line 2: <%
Line 3: Function LogAction(ActionId, ExecTm, ExecResultText)
Line 4:
Line 5: ' Logs user activity
Source File: D:\CAS\DOT NET\webFatality\Fatality\logAction.aspx Line: 3



How can I successfully use these included files?
Thanks for any help.
Marcel
 
S

S. Justin Gengo

Marcel,

User Controls have replaced include files in ASP.NET

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
K

Kevin Spencer

Converting an ASP application to ASP.Net is kind of like converting a
bicycle into a car. It isn't exactly an easy transition, as bicycle parts
are not built for cars. ASP is procedural in nature; ASP.Net is
object-oriented. Server-side includes are generally not used in ASP.Net, as
they are proceudral in nature, relying on sequence to determine their
influence. Instead, I would recommend familiarizing yourself with the
object-oriented programming principles inherent in ASP.Net, and re-architect
your ASP app accordingly. Yes, it does involve more work - in the short run.
In the long run it will be MUCH easier.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
M

Marcel Balcarek

I am familiar with ASP .NET and OO. I have no choice but to do a conversion
as quickly as possible. (Basically rename the files and convert the ADO).
Should I convert the include file to a class? I don't think so. BTW I get
the same error message if I simply copy the Functions into the ASPX main
file after the mainline code (instead of using the include).

Assuming that I am doing a minimal conversion, how do I make ASP functions
work in ASP .NET?

Thx
 
K

Kevin Spencer

I don't know. I don't see the use of converting your ASP app to ASP.Net if
you're going to use ASP.Net as ASP. ASP is designed to work in a certain
way. ASP.Net is designed to work in a certain way. I wouldn't know the first
thing about using it in a way it was not designed for.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top