<!-- +-------------------------------------------------------------------+ --> <!-- | Title: prLogon.asp | --> <!-- | Author: Scott Baker | --> <!-- | Copyright (c) 2000 Elsinore Technologies, Inc | --> <!-- | Date: 1-May-00 | --> <!-- | Contents: VBScript only | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Description: | --> <!-- | This file is responsible for handling the logon efforts of | --> <!-- | solution. When the user presses the logon button, the | --> <!-- | action is handled in this file. Five variables are created, | --> <!-- | some are initialized with data from the posting page. When | --> <!-- | the variables are set, a call is made to the Logon method of | --> <!-- | viEngine object, which returns a long. If the return value | --> <!-- | is zero, then the logon was successful, and the user is sent | --> <!-- | to the next page in the solution. Otherwise, the user is | --> <!-- | redirected to the default.asp page (logon page). | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Change History: | --> <!-- | | --> <!-- | 1-May-00 File was created. | --> <!-- +-------------------------------------------------------------------+ --> <!-- | Software Design comments for this file: | --> <!-- | | --> <!-- | 1. This file is named "prLogon.asp", this naming convention was | --> <!-- | was chosen so that 'pr' represents process followed by the | --> <!-- | name of the form it works for. In this case, this is the | --> <!-- | process page for the Logon page (default.asp). | --> <!-- +-------------------------------------------------------------------+ --> <%@ LANGUAGE=VBSCRIPT ENABLESESSIONSTATE=TRUE%> <% 'Ignore errors without crashing, though you can evaluate them 'as necessary. On Error Resume Next 'Local scope variable declarations Dim sDSN 'As String Dim sUserID 'As String Dim sPassword 'As String Dim lErr 'As Long Dim lVIOptions 'As Long lVIOptions = 45 'viLogonWeb enumeration value sDSN = "Visual Intercept Enterprise" sUserID = TRIM(Request.Form("txtUserID")) SPassword = TRIM(Request.Form("txtPassword")) 'Logon to the specified data source via the Visual Intercept SDK. lErr = viEngine.Logon(sDSN, sUserID, SPassword, lVIOptions, 0) If (0 = lErr) Then 'Logon successful, proceed to the incident page Response.Redirect("fmIncd.asp") Else 'Failed to logon, send the viewer back to the logon page Response.Redirect("default.asp") End If %>
Applying Software Design Techniques to the Web (Web Techniques, Aug 2000)
The days of static Web pages are coming to an end. More and more developers are populating the Internet with increasingly complicated sites, built with the help of scripting languages, dynamic HTML, Java applets, and a number of other complex and esoteric technologies. As Web pages become more like multifaceted Web applications, it's crucial that anyone creating large Web sites learn solid software design techniques.Related Reading
More Insights
INFO-LINK
To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy. | |