.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

create CalenderWebpart using Visual studio.

Posted By:Sagar Pardeshi       Posted Date: February 15, 2011    Points: 15    Category: SharePoint    URL: http://www.dotnetspark.com  

create CalenderWebpart.
 

using System;
using System.Collections.Generic;
using System.Web;
using System.Text;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using System.Web.UI;
using System.Runtime.InteropServices;
namespace CalenderWebpart
{
    [Guid("2483C4E6-F435-48af-B5BB-AD7343ED61CE")]
    public class CalenderWebpart: WebPart
    {
        protected override void CreateChildControls()
        {
            Calendar cldr = new Calendar();
            cldr.Enabled = true;
            cldr.ShowGridLines = true;
            cldr.ShowTitle = true;
            cldr.EnableViewState = true;
            cldr.SelectedDate = DateTime.Now;
        }
        public override void RenderControl(HtmlTextWriter writer)
        {
            RenderChildren(writer);
        }
    }
}


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend