Masterpages
-
Heyy, hello community, i'm new here... and also with asp.net. I'm creating my webpage with masterpages in order to practice a bit. Here's the structure of my masterpage body: div container div header div body div footer end div /container Created the masterpage with the header and footer, inside of the masterpage, created to separate contentplaceholder, one for log in form, and the other for the body components such as register form, welcome message and a nice looking sliderbox. Created the login.aspx, that inherits from the masterpage, and contains the login form and register form, (the one i previously mentioned). Now the problem is: Whenever you log in, you will be redirected to the home page, with a menu below the header (which is not included on the first masterpage). What should i do ? create a sub-masterpage (contains the new menu) that inherits from the main masterpage and then home.aspx inherits from the submasterpage ? Hope you understand my problem, and sorry for my english! My best regards, Marian.
-
Heyy, hello community, i'm new here... and also with asp.net. I'm creating my webpage with masterpages in order to practice a bit. Here's the structure of my masterpage body: div container div header div body div footer end div /container Created the masterpage with the header and footer, inside of the masterpage, created to separate contentplaceholder, one for log in form, and the other for the body components such as register form, welcome message and a nice looking sliderbox. Created the login.aspx, that inherits from the masterpage, and contains the login form and register form, (the one i previously mentioned). Now the problem is: Whenever you log in, you will be redirected to the home page, with a menu below the header (which is not included on the first masterpage). What should i do ? create a sub-masterpage (contains the new menu) that inherits from the main masterpage and then home.aspx inherits from the submasterpage ? Hope you understand my problem, and sorry for my english! My best regards, Marian.
To make sure I understand, you have a component, menu in this case, which you want to show up on all content pages but not on the login and registration pages? Two ways for this. 1) Create two master pages, one with the menu and one without. Create the header and footer as controls so you are not duplicating code. 2) Create the menu as a control that can be displayed, or not, depending on the page being displayed.
I know the language. I've read a book. - _Madmatt
-
To make sure I understand, you have a component, menu in this case, which you want to show up on all content pages but not on the login and registration pages? Two ways for this. 1) Create two master pages, one with the menu and one without. Create the header and footer as controls so you are not duplicating code. 2) Create the menu as a control that can be displayed, or not, depending on the page being displayed.
I know the language. I've read a book. - _Madmatt
First of, thanks for replying Matt! Yes you got it correctly. Ok, so i wasn't that wrong, right ? Create 2 masterpages, one with the menu and the other without it. 1) Sub-masterpage inherits the header and footer from his father, but adds the menu. 2) home.aspx, contact_us.aspx, etc, inherits from the sub-masterpage with menu. 3) login.aspx inherits from the masterpage without the menu with the header and footer. Am i correct? Thanks in advance again, Marian.
-
First of, thanks for replying Matt! Yes you got it correctly. Ok, so i wasn't that wrong, right ? Create 2 masterpages, one with the menu and the other without it. 1) Sub-masterpage inherits the header and footer from his father, but adds the menu. 2) home.aspx, contact_us.aspx, etc, inherits from the sub-masterpage with menu. 3) login.aspx inherits from the masterpage without the menu with the header and footer. Am i correct? Thanks in advance again, Marian.
First of all its Mark, not Matt. There is no inheriting involved. The term has a certain meaning and connotation in a software development context. Improper use of the terminology will lead to confusion. ASP.NET pages don't inherit or implement a master page, they use it. I would not even refer to the second master page as a sub-masterpage. Sub has the meaning of something underneath. Your masterpages siblings.
I know the language. I've read a book. - _Madmatt
-
First of all its Mark, not Matt. There is no inheriting involved. The term has a certain meaning and connotation in a software development context. Improper use of the terminology will lead to confusion. ASP.NET pages don't inherit or implement a master page, they use it. I would not even refer to the second master page as a sub-masterpage. Sub has the meaning of something underneath. Your masterpages siblings.
I know the language. I've read a book. - _Madmatt