Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

web part from sharepoint 2001

  Asked By: Marvin    Date: Mar 16    Category: Sharepoint    Views: 934

There was a web part in the 2001 sharepoiint that would display the ip and logged in name of the user does anyone know if there is a web part like this for 2003?



1 Answer Found

Answer #1    Answered By: Jamar Yates     Answered On: Mar 16

I'm not aware if there's a ready-made web  part but it should be easy to create
your own. I actually needed this functionality for myself (for a "test
everything and let me know what is wrong"-type of web part) and wrote a simple
proof of concept web part. See sources below. Feel free to use or modify as you
see fit:

private string ShowHostInfo()
string userIP = "";

userIP = Context.Request.UserHostAddress.ToString();
return "IP: " + userIP;

private string ShowUserInfo()
string userName = "";

userName = Context.User.Identity.Name.ToString();
return "Username: " + userName;

protected override void RenderWebPart(HtmlTextWriter output)
output.Write("<TABLE BORDER=0><TR><TD>");

If you're not the programmer type (like me), I can share the compiled version
with description files if needed - email me privately for download URL. Hope
this helps!

Didn't find what you were looking for? Find more on web part from sharepoint 2001 Or get search suggestion and latest updates.