-The code work if I put the ContentPlaceHolder outside the WebSplitter in the Master Page.
-----------Here's my Master Page Design Code------------:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><%@ Register Assembly="Infragistics2.Web.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.Web.UI.LayoutControls" TagPrefix="ig" %>
<head runat="server"> <title>Web Splitter Master Page</title></head><body style=" margin:0px; padding:0px; height:100%; width:100%; margin-bottom: 1px; margin-right:1px;"> <form id="form1" runat="server" style="height:100%;width:100%" > <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<ig:WebSplitter ID="WebSplitter1" style="height:100%; width:100%; " runat="server"> <panes> <ig:SplitterPane runat="server" Size="15%" CollapsedDirection="PreviousPane"> <Template>Left Navigation</Template> </ig:SplitterPane> <ig:SplitterPane runat="server"> <Template> <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"> Content Page Inside the ContentPlaceHolder1 </asp:contentplaceholder> </Template> </ig:SplitterPane> </panes> </ig:WebSplitter> </form></body></html>
--------Here's my Default.aspx design code---------:
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> Welcome To My Page!</asp:Content>
----------Here's my Page Load method in the Default.aspx.vb-------:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim content As ContentPlaceHolder content = Page.Master.FindControl("ContentPlaceHolder1")End Sub
I found a solution:
In Page Load method in the Default.aspx.vb, I have the following code, and I can find the ContentPlaceHolder control.
Here's the code:
WebSplitter = Page.Master.FindControl("WebSplitter1")SplitterPane = WebSplitter.Panes(1)TemplateContainer = SplitterPane.Controls(0)contentPlaceHolder = TemplateContainer.FindControl("ContentPlaceHolder1")
Thanks for posting your problem and solution. Both posts helped me resolve my issue.