Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 22nd, 2004, 12:44 AM
Registered User
 
Join Date: Nov 2004
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

 
Old November 22nd, 2004, 09:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
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.

 
Old November 22nd, 2004, 07:43 PM
Registered User
 
Join Date: Nov 2004
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


 
Old November 23rd, 2004, 10:02 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old December 1st, 2004, 11:53 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
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.





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 07: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 03:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.