Friday, January 11, 2013

Visual Webpart "Hello" User / Hello World

Drag and Drop a Lable in Design

Code:


using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint; 

namespace VisualWebPartProject2.VisualWebPart1

{

    public partial class VisualWebPart1UserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "<font color = blue'><marquee> Hello  "+ SPContext.Current.Web.CurrentUser.Name +"</marquee></font>";
        }
    }
}

 

 

No comments:

Post a Comment