Category: ASP Net

  • ASP Including Files

    The #include Directive You can insert the content of one ASP file into another ASP file before the server executes it, with the #include directive. The #include directive is used to create functions, headers, footers, or elements that will be reused on multiple pages. How to Use the #include Directive Here is a file called…

  • ASP Including Files

    The #include Directive You can insert the content of one ASP file into another ASP file before the server executes it, with the #include directive. The #include directive is used to create functions, headers, footers, or elements that will be reused on multiple pages. How to Use the #include Directive Here is a file called…

  • ASP Application Object

    Application Object An application on the Web may consist of several ASP files that work together to perform some purpose. The Application object is used to tie these files together. The Application object is used to store and access variables from any page, just like the Session object. The difference is that ALL users share…

  • ASP Session Object

    The Session object When you are working with an application on your computer, you open it, do some changes and then you close it. This is much like a Session. The computer knows who you are. It knows when you open the application and when you close it. However, on the internet there is one…

  • ASP Cookies

    What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user’s computer. Each time the same computer requests a page with a browser, it will send the cookie too. With ASP, you can both create and retrieve cookie values. How…

  • ASP Forms and User Input

    More Examples A form with method=”get”How to interact with the user, with the Request.QueryString command. A form with method=”post”How to interact with the user, with the Request.Form command. A form with radio buttonsHow to interact with the user, through radio buttons, with the Request.Form command. User Input The Request object can be used to retrieve…

  • VBScript Looping

    Looping Statements Looping statements are used to run the same block of code a specified number of times. In VBScript we have four looping statements: For…Next Loop Use the For…Next statement to run a block of code a specified number of times. The For statement specifies the counter variable (i), and its start and end values. The Next statement increases the…

  • VBScript Conditional Statements

    Conditional Statements Conditional statements are used to perform different actions for different decisions. In VBScript we have four conditional statements: If…Then…Else Use the If…Then…Else statement if you want to If you want to execute only one statement when a condition is true, you can write the code on one line: If i=10 Then response.write(“Hello”) There is no…

  • ASP Procedures

    Procedures The ASP source code can contain procedures and functions: Example Insert the <%@ language=”language” %> line above the <html> tag to write the procedure/function in another scripting language: Example Differences Between VBScript and JavaScript When calling a VBScript or a JavaScript procedure from an ASP file written in VBScript, you can use the “call”…

  • ASP Variables

    More Examples Declare a variableThis example demonstrates how to declare a variable, assign a value to it, and use the value in a text. Create an arrayArrays are used to store a series of related data items. This example demonstrates how to create an array that stores names. Loop through the HTML headingsHow to loop…