Class property into html text boxes
-
Does anyone know how I would go about taking the info stored in a class property and inserting it into my html page? Here is my asp code:
<%@ Language="VBScript" <%Option Explicit%> <% If Session("SuccessfulLogin") = False then Session( "loginFailure") = True Call Response.Redirect ("login.asp") End if %> Alumnus Edit Page <% Dim objDBConnection Dim objDBRecordSet Dim strDBConnectionString Dim strSQL Dim Alum Set Alum = New Alumnus 'Build query string strSQL = "SELECT Title, FirstName, Lastname, MaidenName, StreetAddress, City, State, Email, Phone, GradDate, DOB, Spouse, Occupation, Activities, Comments, Pssword FROM Alumnus WHERE Email = '" & Session("CurrentUser") & "' " 'Create a ADO connection Set objDBConnection = Server.CreateObject ( "ADODB.Connection" ) 'Open connection objDBConnection.Open("brent") 'Create a record set to hold info from query Set objDBRecordSet = Server.CreateObject("ADODB.Recordset") 'Send query to database and store results in objDBRecordSet objDBRecordSet.Open strSQL, objDBConnection 'Assign property to value in recordset Alum.FirstName = objDBRecordSet("FirstName").Value 'Close record set and connection and destroy object references objDBRecordSet.Close() Set objRecordSet = Nothing objDBConnection.Close() Set objDBConnection = Nothing Call Response.Write("Here is your first name: " & Alum.FirstName) 'How do i get my object properties into text boxes? %>
When I call reponse.write it works, I just need help getting the info into the html boxes on my page so they can be edited and resubmitted to my Access database. Thanks for any help... Brent -
Does anyone know how I would go about taking the info stored in a class property and inserting it into my html page? Here is my asp code:
<%@ Language="VBScript" <%Option Explicit%> <% If Session("SuccessfulLogin") = False then Session( "loginFailure") = True Call Response.Redirect ("login.asp") End if %> Alumnus Edit Page <% Dim objDBConnection Dim objDBRecordSet Dim strDBConnectionString Dim strSQL Dim Alum Set Alum = New Alumnus 'Build query string strSQL = "SELECT Title, FirstName, Lastname, MaidenName, StreetAddress, City, State, Email, Phone, GradDate, DOB, Spouse, Occupation, Activities, Comments, Pssword FROM Alumnus WHERE Email = '" & Session("CurrentUser") & "' " 'Create a ADO connection Set objDBConnection = Server.CreateObject ( "ADODB.Connection" ) 'Open connection objDBConnection.Open("brent") 'Create a record set to hold info from query Set objDBRecordSet = Server.CreateObject("ADODB.Recordset") 'Send query to database and store results in objDBRecordSet objDBRecordSet.Open strSQL, objDBConnection 'Assign property to value in recordset Alum.FirstName = objDBRecordSet("FirstName").Value 'Close record set and connection and destroy object references objDBRecordSet.Close() Set objRecordSet = Nothing objDBConnection.Close() Set objDBConnection = Nothing Call Response.Write("Here is your first name: " & Alum.FirstName) 'How do i get my object properties into text boxes? %>
When I call reponse.write it works, I just need help getting the info into the html boxes on my page so they can be edited and resubmitted to my Access database. Thanks for any help... Brentjust set the value atribute of an html control to the value u want it to display for example:
<% 'vbscript code Response.Write( "" ) %>
or:--------------- Horatiu CRISTEA