Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question- Build hyperlink per user 1

Status
Not open for further replies.

pachucos

MIS
Nov 21, 2002
38
US
I am newbie to building asp pages. is there a good reference page or some pointers on what i need to create this?
I need a webage that will build a hyperlink to a another website based on group membership and include the current users id into the hyperlink.
Is this possible to build? or am I way over my head.
Any suggestions would be very helpful.
thank you in advance.
 
It all depends on what the receiving page (the page you are linking to) expects to see in the link. Does it want the user id, does it want the user group?

If you know what the receiving page does, you can incorporate the appropriate code in your page. The easiest way would be to pass this information in the URL of the link, i.e.:

Code:
<a href=&quot;receivingpage.asp?user_group=34&user_id=512&quot;>Go Here</a>

Take Care,
Mike
 
Thanks this will work as a good starting point.
the receiving page only needs the user id. I want the part of the group membership. basically I wnated to create a group and only users in that group are given the link. and the everyone else gets a custom error page.
 
Then you can do something like this on your page:

Code:
If (intGroupCode = 34) Then
    Response.Write(&quot;<a href=&quot;receivingpage.asp?user_id=512&quot;>Go Here</a>&quot;)
Else
    Reponse.Write(&quot;Sorry, this link is not available to you.&quot;)
End If

Take Care,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top