ldoodle
04-18-2006, 05:28 AM
Hi there,
I have a script that displays the entries from the Notes field from a user account within AD, but even though I paragraph the actual entries I make, it doesn't refelct this on the page.
Is it possible to use ASP to place a paragraph after every full stop, as the entries are only on sinlge lines, with one full stop?
Thanks very much/...
<%@ Language=VBScript %>
<%
Dim rs, Com, objCon, objADsPath, objDomain, strUsername, strNotes, intIP
strUsername = Request.ServerVariables("LOGON_USER")
strUsername = Right(strUsername, Len(strUsername) - InStrRev(strUsername, "\"))
intIP = Request.ServerVariables("REMOTE_HOST")
Set objDomain = GetObject ("GC://rootDSE")
objADsPath = objDomain.Get("defaultNamingContext")
Set objDomain = Nothing
Set objCon = Server.CreateObject("ADODB.Connection")
objCon.provider ="ADsDSOObject"
objCon.open "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = objCon
Com.CommandText ="select info FROM 'GC://"+objADsPath+"' where sAMAccountName='"+strUsername+"'"
Set rs = Com.Execute
If intIP = "10.86.76.26" Then
strNotes = "Your teacher has disabled Internet / E-mail access for every computer in this room."
Else
strNotes=rs("info")
End If
rs.Close
objCon.Close
Set rs = Nothing
Set objCon = Nothing
%>
I have a script that displays the entries from the Notes field from a user account within AD, but even though I paragraph the actual entries I make, it doesn't refelct this on the page.
Is it possible to use ASP to place a paragraph after every full stop, as the entries are only on sinlge lines, with one full stop?
Thanks very much/...
<%@ Language=VBScript %>
<%
Dim rs, Com, objCon, objADsPath, objDomain, strUsername, strNotes, intIP
strUsername = Request.ServerVariables("LOGON_USER")
strUsername = Right(strUsername, Len(strUsername) - InStrRev(strUsername, "\"))
intIP = Request.ServerVariables("REMOTE_HOST")
Set objDomain = GetObject ("GC://rootDSE")
objADsPath = objDomain.Get("defaultNamingContext")
Set objDomain = Nothing
Set objCon = Server.CreateObject("ADODB.Connection")
objCon.provider ="ADsDSOObject"
objCon.open "Active Directory Provider"
Set Com = CreateObject("ADODB.Command")
Set Com.ActiveConnection = objCon
Com.CommandText ="select info FROM 'GC://"+objADsPath+"' where sAMAccountName='"+strUsername+"'"
Set rs = Com.Execute
If intIP = "10.86.76.26" Then
strNotes = "Your teacher has disabled Internet / E-mail access for every computer in this room."
Else
strNotes=rs("info")
End If
rs.Close
objCon.Close
Set rs = Nothing
Set objCon = Nothing
%>