Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

Passing username from sharepoint to asp page

Last post 11-12-2007, 1:11 AM by umer.jamil. 3 replies.
Sort Posts: Previous Next
  •  04-26-2007, 7:42 AM 28358

    Passing username from sharepoint to asp page

    Hi all,

    I'm a newbie who needs some serious help!!

    We have just installed sharepoint and have a basic site. I need to create a webpart that will pass the users ID onto another site and display the page.

    At the moment I can do this by the following method:

    1) add in a page viewer web page
    2) input the address with a constant user id - eg - www.mysite.com?userid=desi

    This works exactly as I want.

    However, does anyone know if the userid at the end of the query string can be automatically generated based on the user's login details. Obviously if sue were to log on then I would want the string to read www.mysite.com?userid=sue.

    Thank you for considering my problem,

    Desi
  •  06-29-2007, 2:00 PM 27773 in reply to 28358

    Passing username from sharepoint to asp page

    I have the exact same need, any endless searching has turned up nothing on how to do this. Ideally, I'd like to pull the username and then put that into the URL string. For example:
    http://www.anysite.com?user=JDoe&company=WidgetCorp

    I've tried VBScripts, Javascripts, everything, but can't find an easy way to do this.

    Surely SOMEONE in the SharePoint community knows if this can be done.
  •  06-29-2007, 2:00 PM 27774 in reply to 28358

    Passing username from sharepoint to asp page

    I have the exact same need, any endless searching has turned up nothing on how to do this. Ideally, I'd like to pull the username and then put that into the URL string. For example:
    http://www.anysite.com?user=JDoe&company=WidgetCorp

    I've tried VBScripts, Javascripts, everything, but can't find an easy way to do this.

    Surely SOMEONE in the SharePoint community knows if this can be done.
  •  11-12-2007, 1:11 AM 28849 in reply to 27774

    Re: Passing username from sharepoint to asp page

     i think you can done this by developing a web part or web usercontrol which will

    return link like <a href="http://yoursite/?userid"+user+">"+user+"</a>" 

    then when you load webpart you will dynamiccally get the user 

View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. You’ve Deployed SharePoint…Now What?This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions Ease Your Scripting Pains with the Flexibility of PowerShell!Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer! Protecting Sharepoint with Double-Take for Windows 5.0Providing SharePoint recoverability is a two step process. Learn those steps now. Vendor protection solutions for SharePoint are incomplete at worst and unreliable at best. So what’s an Administrator to do? Read More… Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.