• 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.
0
deepPowdah
Asked:
deepPowdah
  • 2
1 Solution
 
SriVaddadiCommented:
did you set the runat="server" for <asp:table>
example:
<asp:Table runat="server">
            <asp:TableRow>
            <asp:TableCell>
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/>
            </asp:TableCell>
            </asp:TableRow>
            </asp:Table>

The SqlDataSource is to be dragged on to master page design
0
 
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?
0
 
SriVaddadiCommented:
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.
0

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