Home > Microsoft .Net Development Tips > ASP.NET Development > VBScript Tutorial
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ASP.NET DEVELOPMENT

VBScript Tutorial


Jerry Lees, contributor
07.14.2008
Rating: --- (out of 5)


.NET Architecture Essentials Channel
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


VBScript (Visual Basic Scripting Edition) is a interpreted scripting language from Microsoft. It is a subset of the Visual Basic programming language and follows the same syntax. Once you've learned VBScript, you'll be well on your way to understanding Visual Basic. Similarly, if you're already a Visual Basic programmer, you'll be productive with VBScript in no time.

Windows and network systems administrator Jerry Lees is your VBScript guide, as he explains some of the basic VBScript statements below. You can find more advanced VBScript content on Jerry's blog, The VBScript Network and Systems Administrator's Cafe.

VBScript Variables

The DIM statement is used to declare variables. To save space in your code, you can declare more than one variable in a single statement by separating each variable with a comma. The Const statement is useful when you want to reference a specific, unchanging, value in your code multiple times without having to type it in over and over. When you use the Option Explicit statement, you must explicitly declare all of your variables. This helps you to avoid typos.

VBScript Looping Statements

The If...Then...Else statement in VBScript is very similar to the Select Case statement, except it normally only allows for 2 possibilities (true/false) in your condition.

The Do...Loop statement is very useful to execute a block of code more than once. The For...Next statement is for situations where you need to loop through a piece of code a specific number of times. The For Each...Next statement will also loop through a block of code a specific number of times, but is used when the number of loops needed at runtime is unknown.

Other VBScript Statements

The Select...Case statement is a very powerful way to easily perform specific actions based on a comparison of a variable to a series of cases that you specify.

The Exit statement allows you to exit a block of code. It can be used for a subroutine (Exit Sub), function (Exit Function) or the entire script.

The Erase statement is used to erase all the values of an array. The array size and dimensions remain intact.

If you enjoyed this user-generated content, be sure to visit The VBScript Network and Systems Administrator's Cafe for more advanced VBScript topics.



   GOT DEVELOPER QUESTIONS? YOUR PEERS HAVE ANSWERS
Your fellow developers have faced the same or similar problems.
So ask your own question on the IT Knowledge Exchange community.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
ASP.NET Development
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer
XAML as an everywhere presentation format
Introduction to Silverlight 1.0: Building your first Silverlight application
Creating custom ASP.NET 2.0 profile providers
Book excerpt: Silverlight 1.0 explained
Grab the Silverlight 1.0 SDK

ASP.NET and Ajax development
Internet Explorer 8 beta's development tools add source visualizations
Microsoft PDC gives a taste of Windows 7, Visual Studio 2010
Widgetbox provides good example of how to use Facebook Developer Toolkit
Ajax Learning Guide
Mainsoft introduces .NET-to-Java translation tool
Ajax.NET Professional retired
Visual Studio 2008 Learning Guide: JavaScript IntelliSense
Five common Ajax security challenges and how to address them
On ASP.NET AJAX testing and debugging tools
JSON (Javascript Object Notation)

.NET tutorials, guides and quizzes
Ajax Learning Guide
LINQ Learning Guide
F# Programming Fast Guide
Agile Development Learning Guide
.NET User Groups Learning Guide
Visual Studio 2008 Learning Guide
SharePoint 2007 Learning Guide
Developer Swag: 10 Sidebar Gadgets for Developers
Silverlight Learning Guide
Mini-guide: Interop Forms Toolkit

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Ajax  (SearchWinDevelopment.com)
Atlas  (SearchWinDevelopment.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts