Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. master page problem

master page problem

Scheduled Pinned Locked Moved ASP.NET
help
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rcwoods
    wrote on last edited by
    #1

    Hi This is my 1st time using a master page in VisualStudio 2005. Im havin a problem with adding a control to the master page and it is not shown in the content page/s. i simply just dragged a button or textbox onto the masterpage and checked the content page but nothin is there. Could someone please help me out.

    S D S 3 Replies Last reply
    0
    • R rcwoods

      Hi This is my 1st time using a master page in VisualStudio 2005. Im havin a problem with adding a control to the master page and it is not shown in the content page/s. i simply just dragged a button or textbox onto the masterpage and checked the content page but nothin is there. Could someone please help me out.

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Hey put one Content place holder and in then try to drag and drop the textbox and see it.Simply in the master page we cannot see any control.

      Regards, Satips.:rose:

      R 2 Replies Last reply
      0
      • S Sathesh Sakthivel

        Hey put one Content place holder and in then try to drag and drop the textbox and see it.Simply in the master page we cannot see any control.

        Regards, Satips.:rose:

        R Offline
        R Offline
        rcwoods
        wrote on last edited by
        #3

        ok. got it. Thanks for the help.

        1 Reply Last reply
        0
        • S Sathesh Sakthivel

          Hey put one Content place holder and in then try to drag and drop the textbox and see it.Simply in the master page we cannot see any control.

          Regards, Satips.:rose:

          R Offline
          R Offline
          rcwoods
          wrote on last edited by
          #4

          Hi Im still running into a problem. It worked perfectly with my masterpage and content page but now i add another web form and select the masterpage but the new web form doesnt reflect masterpage, has none of the controls.

          1 Reply Last reply
          0
          • R rcwoods

            Hi This is my 1st time using a master page in VisualStudio 2005. Im havin a problem with adding a control to the master page and it is not shown in the content page/s. i simply just dragged a button or textbox onto the masterpage and checked the content page but nothin is there. Could someone please help me out.

            D Offline
            D Offline
            doWhileSomething
            wrote on last edited by
            #5

            If your working with master pages, the first page you should create for your site is the master page. By default, a single content place holder is created on the master page. If you add more than one content place holder, thats fine, but each of your content pages (e.g. form1.aspx / default.aspx) need to have the same amount of content place holders. That said, if you want all of your content pages to have access to "X" control(s), these controls should be placed on the master page itself, not on the content pages. The place holders on the master page are just that, containers that will be populated from the containers on each content page that inherits this master page. Hope this helps !

            My Personal Site

            R 1 Reply Last reply
            0
            • D doWhileSomething

              If your working with master pages, the first page you should create for your site is the master page. By default, a single content place holder is created on the master page. If you add more than one content place holder, thats fine, but each of your content pages (e.g. form1.aspx / default.aspx) need to have the same amount of content place holders. That said, if you want all of your content pages to have access to "X" control(s), these controls should be placed on the master page itself, not on the content pages. The place holders on the master page are just that, containers that will be populated from the containers on each content page that inherits this master page. Hope this helps !

              My Personal Site

              R Offline
              R Offline
              rcwoods
              wrote on last edited by
              #6

              Thanks for the reply. I have only placed the controls so far on my masterpage. The first content page that i created, that inherits from the masterpage, worked perfectly.but then i added another webform and specified that it must also inherit from the masterpage.. but its not showing the controls that i placed in the masterpage.

              D 1 Reply Last reply
              0
              • R rcwoods

                Thanks for the reply. I have only placed the controls so far on my masterpage. The first content page that i created, that inherits from the masterpage, worked perfectly.but then i added another webform and specified that it must also inherit from the masterpage.. but its not showing the controls that i placed in the masterpage.

                D Offline
                D Offline
                doWhileSomething
                wrote on last edited by
                #7

                I't hard to know whats wrong with out seing what you've done. Are you sure you did not add a control inside the content place holder on the content page? I'd be glad to have a look, just post a link to the dl. Or, if you want I can make a simple mock up for you to dl. I'm sure its something small you missed.

                My Personal Site

                R 1 Reply Last reply
                0
                • D doWhileSomething

                  I't hard to know whats wrong with out seing what you've done. Are you sure you did not add a control inside the content place holder on the content page? I'd be glad to have a look, just post a link to the dl. Or, if you want I can make a simple mock up for you to dl. I'm sure its something small you missed.

                  My Personal Site

                  R Offline
                  R Offline
                  rcwoods
                  wrote on last edited by
                  #8

                  all i did was make a master page. place 2 images and a menu control in the masterpage. Then added a new web form and selected the masterPage to inherit. It did not inherit the controls until I added a content placeholder to the masterpage.It then showed the controls in the webform.worked perfectly..but now i wanted to add another webform to the site.which i did, and also selected the masterpage but its not showing any of those controls from the masterpage. dont understand why it worked perfectly for the 1st page but not the 2nd. If u have a simple mock up for me i would greatly appreciate it.

                  R D 2 Replies Last reply
                  0
                  • R rcwoods

                    all i did was make a master page. place 2 images and a menu control in the masterpage. Then added a new web form and selected the masterPage to inherit. It did not inherit the controls until I added a content placeholder to the masterpage.It then showed the controls in the webform.worked perfectly..but now i wanted to add another webform to the site.which i did, and also selected the masterpage but its not showing any of those controls from the masterpage. dont understand why it worked perfectly for the 1st page but not the 2nd. If u have a simple mock up for me i would greatly appreciate it.

                    R Offline
                    R Offline
                    rcwoods
                    wrote on last edited by
                    #9

                    Sorry..i just figured it out! it was a very small thing. on the 2nd content page,within one of the content placeholders, i right-clicked and saw the option of Default to Master's Content. Solved all my problems! Thanks for the help though

                    1 Reply Last reply
                    0
                    • R rcwoods

                      all i did was make a master page. place 2 images and a menu control in the masterpage. Then added a new web form and selected the masterPage to inherit. It did not inherit the controls until I added a content placeholder to the masterpage.It then showed the controls in the webform.worked perfectly..but now i wanted to add another webform to the site.which i did, and also selected the masterpage but its not showing any of those controls from the masterpage. dont understand why it worked perfectly for the 1st page but not the 2nd. If u have a simple mock up for me i would greatly appreciate it.

                      D Offline
                      D Offline
                      doWhileSomething
                      wrote on last edited by
                      #10

                      You can download this one project, it was an example of using CSS, but you should be able to start the project, add pages, etc... Click my site link in the signature, and about three posts down you'll see the dl link to the project. If this does not help you, let me know.

                      My Personal Site

                      1 Reply Last reply
                      0
                      • R rcwoods

                        Hi This is my 1st time using a master page in VisualStudio 2005. Im havin a problem with adding a control to the master page and it is not shown in the content page/s. i simply just dragged a button or textbox onto the masterpage and checked the content page but nothin is there. Could someone please help me out.

                        S Offline
                        S Offline
                        sidbaruah
                        wrote on last edited by
                        #11

                        The contents needs to be placed outside the masterpage contenct place holder. The place holder is for displaying the items of the page using the master page. So place your textbox outside the placeholder and include the masterpage file in your actual page. Hope you are now clear with the masterpage concept... and remember there is no head html or body or form tag in pages with masterpage associated. Hope that helps!!!!

                        I was born dumb!! :laugh:Programming made me laugh:laugh:!!! --sid--

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups