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

ASP to asp.net conversion

P: n/a
I have the following line in asp which errors when you run
it through the .net complier
<%if session("HighRes") = 1 then %>
<img height="9" src="../images/ProductColTopL.gif"
width="8">
<%end if %>

This comes back with the error
BC30689: Statement cannot appear outside of a method body

I am not sure why this is grumbling any ideas greatly
appreciated

Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I added your code to my aspx page and it compiled fine. Is your page an asp
page? More details would be helpful.

"Sara" <Sa*********@guilbert.co.uk> wrote in message
news:0a****************************@phx.gbl...
I have the following line in asp which errors when you run
it through the .net complier
<%if session("HighRes") = 1 then %>
<img height="9" src="../images/ProductColTopL.gif"
width="8">
<%end if %>

This comes back with the error
BC30689: Statement cannot appear outside of a method body

I am not sure why this is grumbling any ideas greatly
appreciated

Jul 19 '05 #2

P: n/a
Hi Thanks for the reply, The code exists in an aspx page. The page was
an asp page that had the file extension changed
from asp to aspx. I have then been going throughthe code and changing
the syntax where it differs from the old asp syntax. The only thing I
can think of is the code is contained in between the html body and not
as part of a subroutine/function ?

Thanks Sara
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.