• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • Last Modified:

ASP.net 3.5 ContentPlaceHolder in <asp:Table in Master Page

I'm using ASP.net 3.5.  I created a MasterPage with a Title bar at the top of the page (form) in an <asp:TableCell and then place a ContentPlaceHolder in the TableCell.  When I do this, I cannot drop a SQLDataSource on the Content Page or even see the ContentPlaceHolder in design view from the content page.

When I move the ContentPlaceHolder out of the Table, it works fine.  

Is this correct, and if so, any recommendations for laying out ContentPlaceHolders on the MasterPage.  I assume the answer is Style sheets.  Please confirm if they work in this situation.
  • 2
1 Solution
did you set the runat="server" for <asp:table>
<asp:Table runat="server">
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>

The SqlDataSource is to be dragged on to master page design
deepPowdahAuthor Commented:
Yes I did have runat="server" on the table.  

I'm a little confused.  I will use the MasterPage for every Page in myApplication.  I will have maybe 20 SQLDataSources.  Should I drag all of them to the one MasterPage.  It would appear to me that would create a lot of overhead on the Master Page.  So if I opened a content page with no data access, I would still have those 20 DataSources to Load.

Do I understand that correctly?
No I dont mean to drag your SQLDatasources all onto master page. I  misunderstood that you wanted to place a SQLdatasource on the master page.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now