By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 985 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 ?

Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
"cr************@hotmail.com" wrote:
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 ?

Nov 19 '05 #2

P: n/a
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/d...displaylang=en

--
HTH,

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

<cr************@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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 ?

Nov 19 '05 #3

P: n/a
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,

Nov 19 '05 #4

P: n/a
See:

http://msdn.microsoft.com/library/de...ppagetoasp.asp

--
HTH,

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

<cr************@hotmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
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,

Nov 19 '05 #5

P: n/a
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
"sara" <sa**@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
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
"cr************@hotmail.com" wrote:
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 ?

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.