Link to home
Start Free TrialLog in
Avatar of deepPowdah
deepPowdahFlag for United States of America

asked on

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.
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

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
Avatar of deepPowdah

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial