Translate from classic asp to asp.net (c#)

C

craigkenisston

Hi,

I'm a bit stuck with an old piece of asp code
According to the originating site, in asp it looks like :

<html>
<body>
My Page
<P>
<script language=javascript
src='http://www.contentinfusion.com/
Article.aspx?ArticleID=<%=Request("ArticleID")%>
&FORMAT=JS&MEMBERID=<%=Request("MEMBERID")%>
&TITLE_TEXTFONT=Arial&TITLE_TEXTSIZE=4&
TITLE_TEXTCOLOR=&BODY_TEXTFONT=Times New Roman
&BODY_TEXTSIZE=3&BODY_TEXTCOLOR= &BODY_BACKGROUNDCOLOR='></script>
</body>
</html>

If I try to use with an asp.net application I get errores, any attemp
to fix, just give more errors. It starts by complaining about a very
long string. Then about the "request" with "Only assignment, call,
increment, decrement, and new object expressions can be used as a
statement".

Could somebody tell me how do I do this in asp.net ?
 
G

Guest

Hi
try to copy ur asp to the new project and then change the exetension to aspx
and compile and c what will happen
hope this help
 
K

Kevin Spencer

I'm stuck with an old Volkswagon Beetle that doesn't run. I took the
alternator out of it, and stuck it in my new Ferrari, but it doesn't fit.
What can I do to make the alternator from my old car fit in my new car?

ASP and ASP.Net have only a few things in common, like an old Volkswagon
Beetle compared to a new Ferrarri. If you want to make your ASP.Net do
something that an old ASP Classic app did before, you're going to have to
rebuild it as ASP.Net, just as you would have to rebuild the alternator from
the Beetle to get it to run in the Ferrarri.

A good place to start would be to learn ASP.Net. Telling you how to rewrite
one piece of code wouldn't be doing you any favors. You'd be right back here
tomorrow with another snippet. Feed a man a fish, and he eats for a day.
Teach a man to fish, and he eats for life. So, here's a good fishing pole:

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
C

craigkenisston

Hi,

Thanks for all your comments. I don't pretend a direct translation of
my code snippet, but a little guide about what not-to-do in asp.net or
how to change.

Regards,
 
F

Faizal Tan

Hi, there,

Well what you can do is get an asp to asp.net application
software to do it for you if you have many or just one page. There are a few
out there for free. If you need one email me i'll gladly pass one to you.

Faizal Tan
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top