Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

A sharepoint newbie and totally clueless about how to begin. My company wants to evaluate Sharepoint as an processing system, so let me tell yo uwhat I want to try, When I login to my default site, I want to display something like Welcome Employee Name: Email where the values within <> are obtained from my AD ( Sharepoint 2007 is integrated with windows AD).

On clicking I want to redirect/open another list which i want to map based on filter of Basically a welcome page and when I click on the name I want to display for the person his approval matrix. Hope that make sense, please help me in getting started.

share|improve this question
add comment

2 Answers

The first part of your question could be solved using a UserControl embedded somewhere (your masterpage for example).

If you're already using SharePoint integrated with AD, you could just get the current user's display name:

public class CurrentUser : System.Web.UI.UserControl
{
    protected Label lblCurrentUser;

    protected override void CreateChildControls()
    {
        base.CreateChildControls();

        try
        {
            SPWeb web = SPControl.GetContextWeb(this.Context);
            lblCurrentUser.Text = web.CurrentUser.Name;
        }
        catch (Exception)
        {
            // TODO: handle exception
        }
    }
}

Then your CurrentUser.ascx could look something like:

<%@ Control Language="C#" Inherits="Company.Something.CurrentUser,NameOfYourDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b4145661be917a94" CompilationMode="Always" %>
<span>Welcome <asp:Label ID="lblCurrentUser" runat="server" /></span>

More info on making a complete user control here: http://jamestsai.net/Blog/post/Using-ASPNET-Web-User-Control-with-Code-Behind-in-SharePoint.aspx

As for the second part of your question, that sounds like company specific requirements that you'd have to elaborate on.

share|improve this answer
add comment

If you know how to code in .NET and have queried active directory before using .NET, then this seems like it would be a pretty easy webpart to make. I've made similar ones that query AD to pull back user information and they required very little code.

As for the "open another list based on a filter", I don't quite understand what you are talking about here but it sounds simple enough to accomplish in the same webpart.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.