asp to .net

A

Aleks Kleyn

I am converting code from asp to asp.net. Initially I decided to make
minimal changes. Code uses vbscript, so when I convert i substitute by Vb
and add declararation where it is nessary. However on this step i try to
keep original code. It works. But in one module i meet two starnge errorrs.
Sometimes I see one, sometimes I see other.

Compiler Error Message: BC30689: Statement cannot appear outside of a method

body.

Source Error:

Line 29: <!--#include file = "includes/header.asp"-->

Line 30:

Line 31: <%if Session("Desk_Id")="I" or Request("deskforce")="I" or

Session("deskforce")="I" then%>

Line 32: <%else%>

Line 33: <!--#include file = "upNav.asp"-->



Source File: C:\AspTest\ShapLaw\wipListDetails.aspx Line: 31



-----------

Compiler Error Message: BC30188: Declaration expected.

Source Error:





Line 1: <%

Line 2: Dim DataConn as object

Line 3: DataConn = Server.CreateObject("ADODB.Connection")

Line 4: dim v_DSN as string

Line 5: v_DSN ="Persist Security Info=False;dsn=dsnes; uid=shaplawsqluser;

pwd=shapiro"



Source File: C:\AspTest\ShapLaw\includes\dsn.asp Line: 3



May be somebody has idea?
 
M

Mike Brind

Aleks said:
I am converting code from asp to asp.net. Initially I decided to make
minimal changes. Code uses vbscript, so when I convert i substitute by Vb
and add declararation where it is nessary. However on this step i try to
keep original code. It works. But in one module i meet two starnge errorrs.
Sometimes I see one, sometimes I see other.

Compiler Error Message: BC30689: Statement cannot appear outside of a method

body.

Source Error:

Line 29: <!--#include file = "includes/header.asp"-->

Line 30:

Line 31: <%if Session("Desk_Id")="I" or Request("deskforce")="I" or

Session("deskforce")="I" then%>

Line 32: <%else%>

Line 33: <!--#include file = "upNav.asp"-->



Source File: C:\AspTest\ShapLaw\wipListDetails.aspx Line: 31



-----------

Compiler Error Message: BC30188: Declaration expected.

Source Error:





Line 1: <%

Line 2: Dim DataConn as object

Line 3: DataConn = Server.CreateObject("ADODB.Connection")

Line 4: dim v_DSN as string

Line 5: v_DSN ="Persist Security Info=False;dsn=dsnes; uid=shaplawsqluser;

pwd=shapiro"



Source File: C:\AspTest\ShapLaw\includes\dsn.asp Line: 3



May be somebody has idea?

This newsgroup deals with classic asp. Your question relates to
dotnet, which is a different technology. Try
microsoft.public.dotnet.framework.aspnet. People over there will be
very much more familiar with VB.Net syntax and declaration
requirements.
 

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

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top