How to include asp file in C# coding

G

Guest

Hi,

I have an .asp file, that has some functions written in
LANGUAGE="JavaScript". I need to have a C# program, that includes this .asp
file and use the functions written in it.

I mean that I have to call the functions (present in .asp page and written
in 'JavaScript'), pass required parameters to the functions and get the
result from it into my C# program.


How should I include the .asp file so that my desired functionality can be
acheived.
Can someone please suggest me a way to move ahead on this.

Thanks,
Shankar.
 
G

Guest

As far as i know, there is no way you could use C# with asp (not asp.net)
I reckon you need to use asp.net instead of asp in order to use C#
asp.net will have a extension ".aspx" instead of ".asp"

Hope it helps,
Ivan Wong
 
P

Patrice

IMO the simplest way is just to port those functions to C# (assuming server
side JavaScript).

Alternate options :
- port them to J# (if easier ?) and compile them into a DLL
- keep the ASP page and make its functions available by issuing HTTP
requests
 
O

Ollie Riches

if it is just a javascript function you want why not remove it from the asp
page and include it in a script file in your new project

Ollie Riches
 
G

Guest

Thank you for your thought.

Basically i do have a different application which is up & running on ASP
(not asp.net). And there is always a posibility of these functions being
updated by that application owner.

My requirement is, I should not change anything in the .asp file; but try to
use the JavaScript funtions in my C# application.

From you suggestion, I got a thought to go ahead on this. I will better try
to read the .asp file at runtime in my C# and try to create a Script file
with the read data from the .asp file at runtime only.

I am not sure this will work or not but will surely give a try.

Thanks for your thought.
Shankar.
 

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

Top