Sharepoint 2013 Create a Visual Web Part

In Visual Studio 2012, create a new SharePoint 2013 Empty Project:


Choose your dev SharePoint Site and deploy as a farm solution:

Add a Visual Web Part item to your project:


Edit your Visual Web Part, and insert a calendar and a label(choose from toolbox):


Define the calendar’s selected date changed event, by double clicking any date in your calendar, and change the event code:

protectedvoid Calendar1_SelectionChanged(object sender, EventArgs e)


this.Label1.Text = Calendar1.SelectedDate.ToString();


Deploy your solution, and add the Visual Webpart to your Home page:




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: