asp to aspx - vb to vb.Net

J

Jim Bunton

I have written asp web pages using vbscript and I am used to using include
files.
E.G.
<!-- #include file = "adovbs.inc" -->
<!-- #include file = "MyInclude.asp" -->

BUT - I guess it's time to move on!
So I'm 'having a go' with Ms Visual Web Developer (Express)
vb.net etc
AND my grasp of 'Object Orientated' is a bit shakey]

?? start ??
1. do I need something like adovbs in this environment

2. 'MyInclude' is generally a set of Function and procedures often used.
eg
Function OpenSuppliers (Cn, CursorToUse, LockToUse)
Dim sql, Rs
set Rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM Suppliers "
Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
Set OpenSuppliers = Rs
End Function


How do I implement such functions in in an include file this new environment
?? end ??
 
G

Guest

I have written asp web pages using vbscript and I am used to using include
files.
E.G.
<!-- #include file = "adovbs.inc" -->
<!-- #include file = "MyInclude.asp" -->

BUT - I guess it's time to move on!
So I'm 'having a go' with Ms Visual Web Developer (Express)
vb.net etc
 AND my grasp of 'Object Orientated' is a bit shakey]

??  start ??
1. do I need something like adovbs in this environment

2. 'MyInclude' is generally a set of  Function and procedures often used.
    eg
Function OpenSuppliers (Cn, CursorToUse, LockToUse)
   Dim sql, Rs
   set Rs = Server.CreateObject("ADODB.Recordset")
   sql="SELECT * FROM Suppliers "
   Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
   Set OpenSuppliers = Rs
End Function

How do I implement such functions in in an include file this new environment
??  end ??

1) no
2) using classes --> read more http://www.startvbdotnet.com/oop/class.aspx
 
J

Juan T. Llibre

re:
!> How do I implement such functions in in an include file this new environment

Forget about include files, and forget about ado/vbs.

From now on you'll use class files to store your functions
( or you can also write inline code in your aspx pages) and ADO.NET for your database access.

Give these two tutorials a good read :

http://quickstarts.asp.net/QuickStartv20/aspnet/

http://www.w3schools.com/ASPNET/default.asp

Start by following the code for simple pages before you tackle database access.

There's several data access examples here :
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx

Here's a data acess example for an Access database :
http://www.w3schools.com/ASPNET/aspnet_dbconnection.asp




===============
 
J

Jim Bunton

Thanks to Alexey, Juan & Mark for thier responses to my posting

Looks like this will kaeep me going for an hour or two!

BUT any other relevant suggestions welcome.

Jim Bunton
 
G

Guest

Thanks to Alexey, Juan & Mark for thier responses to my posting

Looks like this will kaeep me going for an hour or two!

BUT any other relevant suggestions welcome.

Jim Bunton


I have written asp web pages using vbscript and I am used to using include
files.
E.G.
<!-- #include file = "adovbs.inc" -->
<!-- #include file = "MyInclude.asp" -->
BUT - I guess it's time to move on!
So I'm 'having a go' with Ms Visual Web Developer (Express)
vb.net etc
AND my grasp of 'Object Orientated' is a bit shakey]
??  start ??
1. do I need something like adovbs in this environment
2. 'MyInclude' is generally a set of  Function and procedures often used.
   eg
Function OpenSuppliers (Cn, CursorToUse, LockToUse)
  Dim sql, Rs
  set Rs = Server.CreateObject("ADODB.Recordset")
  sql="SELECT * FROM Suppliers "
  Rs.open Sql,Cn, CursorToUse,LockToUse,adCmdText
  Set OpenSuppliers = Rs
End Function
How do I implement such functions in in an include file this new
environment
??  end ??

I would also recommend you to visit www.asp.net, where you will find
videos and sample projects to get started with programming on ASP.NET

http://www.asp.net/get-started/
http://www.asp.net/community/projects/
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top