Subroutines Home » ASP » VBScript Branching Logic » Subroutines Example 1 : Using Subroutine <%@Language=VBScript%> <%Option Explicit %> Using Subroutines <% Sub SubHeading Response.Write("") Response.Write("Your Name") Response.Write("Your Site Name") End Sub SubHeading ' Call the SubHeading three times SubHeading SubHeading %> Output Example 2 : A Simple Subroutine with Argument Passing <%@Language=VBScript%> <%Option Explicit %> Using Subroutines <% Dim inumTimes Sub SubHeading(inumTimes) Dim iCounter for iCounter=1 to inumTimes Response.write("") Response.write("Your Name: ") Response.write("Your Web Site Name:") Next End Sub inumTimes=4 SubHeading inumTimes Response.write("inumTimes is :" & inumTimes) %> Output Read more » Share on Facebook Share on Twitter Share on Google Plus RELATED POSTS
Blogger Comment
Facebook Comment