Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 22nd, 2004, 12:44 AM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can I use classic asp in aspx pages

Hi,

I'm a classic ASP guy that admittedly doesn't know much about C# or ASP.NET. I was asked to edit a C# page (it only contained a simple code behind statement) to perform some IP address checking.

So I wrote some simple ASP to extract the info from the server variables only to find the page no longer runs.

Does the aspx interpreter not handle classic asp? Do i need to declare my segment of code as classic asp? If so, how?

Any help will be gratefully received

cheers

  #2 (permalink)  
Old November 22nd, 2004, 09:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Why not take the ASP code and convert it and type it in the code behind file? It would be a good start to learning ASP.NET.

  #3 (permalink)  
Old November 22nd, 2004, 07:43 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the reply, but I would rather avoid playing with the code behind stuff as it would then affect the rest of our clients, I want it to be specific for this one particular client. I am assuming that the actual code that is referenced by the code behind instruction is not copied if duplicate the original calling page.

And yes, you are right, I probably do need to get my hands dirty with ASP.NET / C# so this could be a good start.

Cheers


  #4 (permalink)  
Old November 23rd, 2004, 10:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I guess I don't quite see what you want. Did you write a page entirely in classic ASP and you can't get it to run at all, or are you trying to mix them somehow?

J
  #5 (permalink)  
Old December 1st, 2004, 11:53 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by dcongy
 Does the aspx interpreter not handle classic asp? Do i need to declare my segment of code as classic asp? If so, how?
No, the aspx runtime is set up to parse and run .NET resources only. So if you create an ASP page it's process thru the ASP processor.

It sounds like you are asking "can I write ASP code in a file with an ASPX extension?"

The answer to that question is "well, yes/no/sort of."

If you put a <% %> section with code that is CLR compliant in an ASPX page it may very well work. However, you should avoid it because it goes against the whole UI/logic separation technique of ASP.NET. Furthermore, if you tried using functions unique to VBScript in the ASPX page it would definately break.

What it comes down to is this: Either just write a regular ASP page that you are familiar with, or learn how to write ASP.NET the correct way. If you try to munge the two together you will only taint your ASP.NET learning and will complicate things for yourself in the future.
 


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i have .ASP & .ASPX pages in same .net Appli? vijaykumartaduri Classic ASP Basics 3 December 14th, 2006 09:42 AM
running Classic ASP pages on Unix Server crmpicco Classic ASP Basics 10 December 4th, 2006 07:55 AM
can I ovveride aspx pages? shenku ASP.NET 1.x and 2.0 Application Design 1 June 6th, 2005 08:04 AM
Shall i use ASP page and ASPX pages in in .net prj bvrao VS.NET 2002/2003 4 January 5th, 2004 04:39 AM
how to get into the Events of aspx pages kashif ASP.NET 1.0 and 1.1 Basics 1 July 29th, 2003 04:15 AM



All times are GMT -4. The time now is 02:16 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.