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

I created a custom master page. Master page i placed a control which contain the calendar(header content place holder). I wanted to pass the calendar value(which placed in master page). The wiki pages(SharePoint .aspx page where we can't write the custom code) inherit from the custom master page. So how can I pass the value from the calendar user control to another user control which is place in side the wiki page. Will you please help me out this problem.

regards,

share|improve this question

1 Answer 1

If I understood is correctly, you want to pass some value to a control that is placed on Master page.

You can easily do it in the code behind of the Content Page; the page which is inherits from master Page:

CalendarControl myCalendar= (CalendarControl )this.Master.FindControl("PlaceHolderFullMain").FindControl("PlaceHolderMain").FindControl("Calendar1")

Note: Replace the CalendarControl with the actual type of Calendar you are using. Also, change the name of place holders (in which the calendar control is placed) accordingly. You can access any control on your Master page using this way.

cheers!

share|improve this answer
    
For calendar event change i wanted to update the value of the content page. How can I add the event handler to the master page? –  Basant B. Pandey Jan 10 '11 at 16:06
    
you don't need to add even handler to the Master page. Go for the contentpage instead –  Falak Mahmood Jan 11 '11 at 5:41

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.