473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ADSI/ASP: How to pass distinguishedName as hidden form field?

[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
Jul 19 '05 #1
0 1488

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
2
by: Christopher Johannsen | last post by:
Good Day: I am working on building a tool Using ASP/COM & IIS5.1 for a non-administrative technical support team to change domain passwords for users. I have the basic interface built and...
6
by: JDP | last post by:
First off let me say that http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp would not work as I see it. Right off, I can't have a cookie. ...
7
by: bonnie.tangyn | last post by:
Hello All Could anyone give me some suggestions on passing a long string between ASP pages? I have three asp pages - h_email content.asp, h_process_email.asp and h_preview_email.asp In the...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
2
by: Vorpal | last post by:
I have a vbScript function that works quite well, but fails when I attempt to run it in an ASP pages. Here is the function: Function GetGroups(DistinguishedName) 'Returns an array of groups or...
0
by: jianxin9 | last post by:
Hi everyone, I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can...
1
by: zmunoz | last post by:
I am working on a script using ADSI via COM in PHP. The script works for the most part when I query a user using the following function: function passwordExpires($userDN) { $comLDAP = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.