Thursday, May 27, 2010

Accessing Master page functions from a content page

Accessing Master page functions from content page we must include a MasterType directive at the top of the Content page ASPX file:

<%@ MasterType virtualpath="~/DetailsMaster.master" %>

In DetailsMaster.master.cs page
public void SavePageData()
{
// function definition
}

After place the MasterType directive is in place in the Content page, then public functions in the Master page are available to the Content page code.

C# Code:
//Call the SavePageData function from the Master page
Master.SavePageData();

I hope it will helpfull for other developer.

4 comments:

Anonymous said...

I would like to exchange links with your site www.blogger.com
Is this possible?

Unknown said...

yap

Anonymous said...

I would like to exchange links with your site aspboss.blogspot.com
Is this possible?

Sajib said...

It's really a extra-ordinary site....its just fulfill the developers daily needs......

Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'

Exception: Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'...