Posted on 1999-07-28
Medium Priority
Last Modified: 2010-04-30
I am "VB Programmer".But i don't know how to use ASP.Explain with some simple example with coding how i can use ASP in my "Visual Basic" ?
Question by:bhavesh55

Accepted Solution

mayhew earned 20 total points
ID: 1528032
ASP isn't really something you use in Visual Basic.  It's more of a method of making web pages dynamic.

It does this by allowing you to use code to (for example) make a data connection and populate a web page with data from a database or change the html code in the web page based on a user response.

Currently you can use VBScript, JavaScript/JScript, or PERL as your ASP scripting language.

The difference between using VBScript (for example) in ASP and just using it independantly is that by itself, VBScript runs on the client side and is restricted to client side functionality.

Whereas in the context of ASP, your VBScript code will run on the server before the page is served up.

Mechanically, you write ASP code by using html like tags.

The ASP code is surrounded by <% and %>

The following sample code gets information from a database using odbc and displays it in a web page.

<%@ language="vbscript" %>

set ConnObj = Server.CreateObject("ADODB.Connection")
set RstObj = Server.CreateObject("ADODB.Recordset")

ConnObj.open "MyDSN"

strSQL = "select id, deptname from department"

RstObj.Open strSQL, ConnObj,adOpenKeySet,,adCmdTable

<H2>Please select the department budget to view.</H2><br>
<FORM NAME="TEST" ACTION="display.asp" method="post">
<SELECT name="deptno">


do until RstObj.EOF
      response.write("<option value=" & RstObj("id") & ">" & RstObj("deptname"))

<input type="submit" value="View Budget">


Hopefully this will give you a rudimentary understanding.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As a person who answers a lot of questions, I often see code that could be simplified, made easier to read, and perhaps most importantly made easier to maintain if the code was modified to use the Select Case statement. This article explains how to…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question