Welcome to Office and 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 capabilities with this free SharePoint CD. IT ConnectionsDive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities. Attention User Groups & User Group Leaders...Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes. And add Windows IT Pro & SQL Server Mag articles alongside your own message!. Get Specialized SharePoint Training!SharePoint MVPs Dan Holme, Michael Noel, and Andrew Connell share their perspective and expertise in these exclusive eLearning seminars. One Event for developers and one for IT pros. Choose the one that fits your needs! Get SQL Server 2008 at SharePoint ConnectionsDon’t miss SharePoint Connections, the premier event for Microsoft IT Professionals, in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.