How edit page in design view when has a master page?

Discussion in 'ASP .Net' started by Ronald S. Cook, Mar 11, 2007.

  1. For my web pages that have an associated master page, when I try to work
    with them in design mode, I get this "gray film" over it and I can edit only
    the master.

    How can I get to my page in design mode without having to remove the
    association with the master page?

    Thanks,
    Ron
     
    Ronald S. Cook, Mar 11, 2007
    #1
    1. Advertising

  2. Ronald S. Cook

    Roland Dick Guest

    Ronald S. Cook schrieb:
    > For my web pages that have an associated master page, when I try to work
    > with them in design mode, I get this "gray film" over it and I can edit only
    > the master.


    Hi Ron,
    are you sure you have a contentplaceholder-tag in your master page and
    fill that in you aspx page?

    The VS designer renders the whole page, i.e. master and content parts,
    but "greys out" the master parts. The contents should not be greyed out
    (unless something prevents the contentplaceholder-tag in the master page
    from being rendered; for example, a contentplaceholder in the
    loggedintemplate of a loginview on the master page as in:

    <asp:LoginView ID="LoginView2" runat="server">
    <AnonymousTemplate>
    You are not logged in!
    </AnonymousTemplate>
    <LoggedInTemplate>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
    </LoggedInTemplate>
    </asp:LoginView>

    Here, the designer always displays the anonymoustemplate and therefore
    no contentplaceholder at all. If someone knows a way around this, let me
    know..

    Hope that helps, otherwise post some code.

    Cheers,
    Roland
     
    Roland Dick, Mar 12, 2007
    #2
    1. Advertising

  3. Thanks Roland. It looks like it did it because I had my contentplaceholder
    in my mater page enclosed within table elements. I removed them (and
    shifted that responsibility to the indivisual pages) and I can now see those
    pages in designer.

    I appreciate the response.

    Ron


    "Roland Dick" <> wrote in message
    news:...
    > Ronald S. Cook schrieb:
    >> For my web pages that have an associated master page, when I try to work
    >> with them in design mode, I get this "gray film" over it and I can edit
    >> only the master.

    >
    > Hi Ron,
    > are you sure you have a contentplaceholder-tag in your master page and
    > fill that in you aspx page?
    >
    > The VS designer renders the whole page, i.e. master and content parts, but
    > "greys out" the master parts. The contents should not be greyed out
    > (unless something prevents the contentplaceholder-tag in the master page
    > from being rendered; for example, a contentplaceholder in the
    > loggedintemplate of a loginview on the master page as in:
    >
    > <asp:LoginView ID="LoginView2" runat="server">
    > <AnonymousTemplate>
    > You are not logged in!
    > </AnonymousTemplate>
    > <LoggedInTemplate>
    > <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    > </asp:ContentPlaceHolder>
    > </LoggedInTemplate>
    > </asp:LoginView>
    >
    > Here, the designer always displays the anonymoustemplate and therefore no
    > contentplaceholder at all. If someone knows a way around this, let me
    > know..
    >
    > Hope that helps, otherwise post some code.
    >
    > Cheers,
    > Roland
     
    Ronald S. Cook, Mar 12, 2007
    #3
  4. Ronald S. Cook

    James Curtis Guest

    This is what I do between my development on my machine and NOT the
    production server.

    On my dev machine, I'll take out the following tags and paste them to
    notepad:

    <asp:LoginView ID="LoginView1" runat="server">
    <LoggedInTemplate>
    <<< leave this content here >>>
    </LoggedInTemplate>
    <AnonymousTemplate>
    <<< this content here should be moved as well >>>
    </AnonymousTemplate>
    </asp:LoginView>

    This way, you can locally use the GUI and Smart Tags to edit your pages
    while using Master Pages. When you are ready to push the site back to the
    production server OR need to test the LoginView functionality, just put back
    your code into the Master Page.

    Cheers,

    James
    Pier Cove Software
    www.piercove.com
     
    James Curtis, Aug 13, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page