[FOLLOW-UPS TO microsoft.public.scripting.vbscript]
Hi All,
I'm running into issues with passing the distinguishedName of a user as a
hidden form field in a form from one page to the result page.
Page 1: User enters user name in a form field
Page 2: Queries AD, gets distinguishedName, binds to the user.
Need to add more info to the user if attributes not present.
Relevant portion of FORM:
Response.Write("<B>ID: " & objUser.ID & "<Font color='Red'>not entered!
</font></B>" & _
"<FORM NAME='Form_Addid' ACTION='addid.asp' METHOD='post'>" & _
"<INPUT TYPE='text' NAME='inputId' SIZE=5 MAXLENGTH=6><br>" & _
"<INPUT TYPE='hidden' NAME='Username' value=" & objUser.sAMAccountName &
">" & _
"<INPUT TYPE='hidden' NAME='UserDN' value=" & objUser.distinguishedName &
">" & _
"<INPUT TYPE='submit' NAME='Submit_id' value='Add ID'></FORM>")
Page 3: Process form from prevoius page, populate attributes for the same
user.
Relevant portions of ASP code to get user's details from previous page.
<%
strUsername=Request.Form("Username")
strUserDN = Request.Form("UserDN")
Response.Write("Username: " & strUsername)
Response.Write("Distinguished Name" " & strUserDN)
%>
Questions:
i) Can the user bind on Page 2 be carried over to page 3 so there's no need
to search and bind to the user again?
ii) If not, can the distinguishedName be passed on to Page 3 (like I'm
trying to do) to eliminate the search portion and simply bind to the
distinguishedName?
When I try to pass the distinguishedName to Page 3 as a hidden form field,
and display the field using Response.Write - I only get a partial
distinguishedName - just the CN portion.
sAMAccountName seems to be passing without any issues (but then I'd need to
search and bind again based on that).
Thanks,
Bharat Suneja