Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











STATEMENT:  With  ...  End With


 
With object
      any legal code
End With

 
 Implemented in version 5.0
 
The With statement allows you to execute code on the named object. It is very important to understand that you can only specify a single object to be acted upon. You cannot list several objects.
 
You can nest With statements inside of other With statements or inside other conditional statements, such as an If Else. However, do not jump into or out of With ... End With blocks of code. The problem is that either the With or End With portion of the statement may not be executed and this could cause errors or generate erroneous results.
 
Between the object name and End With, you may place any legal block of VBScript code. For example, you could place statements assigning values to the properties of the designated object, as shown below.
 
Code:
<%
With CatObject
   Rem assign properties
   .CatName = "Amy"
   .CatAge = 3
   .CatColor = "black, orange, white"
End With
%>


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information