Hi,

Is there a way to pass link text as a session variable to the linked page?

Here's what I'm trying to do :
The page has a list of groups. Each group name appears in a <A HREF> </A>
tag. The page has a binding to the group(s) and has the displayName &
distinguishedName of the group.

When a user clicks on the group name - which appears between the <A> </A>
tags and is a variable - the sAMAccountName or displayName of the group, the
corresponding distinguishedName should be passed to the next page as a
session variable.

(I can do it with a separate button and a hidden form value, but that
doesn't work for all names with a space.)

Thanks,
Bharat

Re: Passing link text as session variable by Jan

Jan
Wed Sep 22 15:32:52 CDT 2004

Hi Bharat,

Try this (instead of a session variable):
Response.Write "<a href='newpage.asp?strDN=" &
Server.URLEncode(objGroup.distinguishedName) & "'>" & objGroup.displayName
& "</a>"

The URLEncode function will encode any characters that can't normally be
sent in an URL.
Instead of the distinguishedName, you can also send the guid to the next
page. I think that's nicer.


Kind regards,
Jan Nielsen