473,756 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

[FOLLOW-UPS TO microsoft.publi c.scripting.vbs cript]

Hi All,

I'm running into issues with passing the distinguishedNa me 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 distinguishedNa me, 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_Addi d' ACTION='addid.a sp' METHOD='post'>" & _
"<INPUT TYPE='text' NAME='inputId' SIZE=5 MAXLENGTH=6><br >" & _
"<INPUT TYPE='hidden' NAME='Username' value=" & objUser.sAMAcco untName &
">" & _
"<INPUT TYPE='hidden' NAME='UserDN' value=" & objUser.disting uishedName &
">" & _
"<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=Req uest.Form("User name")
strUserDN = Request.Form("U serDN")
Response.Write( "Username: " & strUsername)
Response.Write( "Distinguis hed 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 distinguishedNa me be passed on to Page 3 (like I'm
trying to do) to eliminate the search portion and simply bind to the
distinguishedNa me?

When I try to pass the distinguishedNa me to Page 3 as a hidden form field,
and display the field using Response.Write - I only get a partial
distinguishedNa me - 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 1507

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

Similar topics

6
2751
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 = server.createobject("scriptlet.typelib").guid guid=Left(guid,instr(guid,"}")) genguid=guid
2
4084
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 working from my developement machine (Windows XP Pro SP 1A) which is hosting the pages for now. The problem is that when I try to access the site from a browser on a different pc using my credentials (IIS is running in Windows Authentication), it...
6
1630
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. Anyway, another solution suggests using hidden form fields only helps me to know that there is a way, I don't know how to pass a hidden form field from my clasic ASP to ASP.Net
7
1774
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 h_email_content.asp, user can enter their To, CC, From, email content and other information. In this page, there are two buttons at the bottom- "preview email" and "send email".
0
3668
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 delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET. · When was the first version of .NET released? The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on...
0
3841
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 for the first time versus when the form is posted (sent to the server), which allows you to program accordingly. · What are user controls and custom controls? Custom controls: A control authored by a user or a third-party software vendor that...
2
1947
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 a 1-element array detailing the error. Const E_ADS_PROPERTY_NOT_FOUND = &h8000500D Dim oUser,asGroups,sGp Dim oConn,oCmd,oRS
0
2179
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 select which department they will send the form to (we are trying to consolidate forms). This is what I have so far, but when I test the form, I keep getting this error message: Mailing Failed... Error is: FromAddress Property cannot be blank. You...
1
3157
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 COM('LDAP:'); $getUser = $comLDAP->OpenDSObject('LDAP://' . $this->server . '/' . $userDN, $this->domain . "\\" . $this->user, $this->pass, 1); $dateParse = date_parse($getUser->passwordLastChanged); $today = time(); $expDate =...
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.