Sharepoint 2013 Create a Visual Web Part

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

app1

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

Add a Visual Web Part item to your project:

app3

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

app4

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:

app5

Advertisements

Tags:

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: