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. Opening webpage having stylesheets in masterpage contentplaceholder

Opening webpage having stylesheets in masterpage contentplaceholder

Scheduled Pinned Locked Moved Web Development
htmlsysadminhelp
4 Posts 3 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.
  • M Offline
    M Offline
    mominafiz
    wrote on last edited by
    #1

    i got little problem with opening a webpage in masterpage's contentplaceholder. To open a webpage in contentplaceholder of masterpage i need to do is remove html tag , head and title... and doctype tag too. along with this i need to remove runat=server from form tag and put action instead. and on the top most line '@page' i need to add masterpagefile attribute. All code except for the first line has to be placed in asp:content control with ref to master contentplaceholder...... but what i do if my webpage has style sheet ..i cant remove head tag bcoz it contains style sheet link..and if dont remove style from the head and try to run removing html tags and doctype....the webpage opens in masterpage but on clicking on tab which is in webpage takes me to homepage instead of opening tab. webpage code .aspx

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestStandards.aspx.vb"
    Inherits="PATHOLOGY.TestStandards" %>

    Standards

      Test Name:
    
    E J 2 Replies Last reply
    0
    • M mominafiz

      i got little problem with opening a webpage in masterpage's contentplaceholder. To open a webpage in contentplaceholder of masterpage i need to do is remove html tag , head and title... and doctype tag too. along with this i need to remove runat=server from form tag and put action instead. and on the top most line '@page' i need to add masterpagefile attribute. All code except for the first line has to be placed in asp:content control with ref to master contentplaceholder...... but what i do if my webpage has style sheet ..i cant remove head tag bcoz it contains style sheet link..and if dont remove style from the head and try to run removing html tags and doctype....the webpage opens in masterpage but on clicking on tab which is in webpage takes me to homepage instead of opening tab. webpage code .aspx

      <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestStandards.aspx.vb"
      Inherits="PATHOLOGY.TestStandards" %>

      Standards

        Test Name:
      
      E Offline
      E Offline
      Eduard Keilholz
      wrote on last edited by
      #2

      Actually, i Don't really understand your question, why would you remove all tags (head etc.) from the masterpage?

      .: I love it when a plan comes together :. http://www.zonderpunt.nl

      M 1 Reply Last reply
      0
      • E Eduard Keilholz

        Actually, i Don't really understand your question, why would you remove all tags (head etc.) from the masterpage?

        .: I love it when a plan comes together :. http://www.zonderpunt.nl

        M Offline
        M Offline
        mominafiz
        wrote on last edited by
        #3

        head, title and doctype tags are not removed from the masterpage.. it has been removed from the webpage which i want to display in masterpages's contentholderplace. if u refer masterpagefile in <@page> line then head and title, html and doctype tags will show error that these tags are should not be nested in div. i got my master page and a webpge which i want to open in master page. The webpage is having tabs and on clicking on it open the view of that tab. It works perfectly if not opened in masterpage's contntplaceholder. When i open it in masterpage contentplaceholder the webpage appears ...i can even see the tabs but on clicking on tabs takes me to home page which is default page instead of showing me tab view.

        1 Reply Last reply
        0
        • M mominafiz

          i got little problem with opening a webpage in masterpage's contentplaceholder. To open a webpage in contentplaceholder of masterpage i need to do is remove html tag , head and title... and doctype tag too. along with this i need to remove runat=server from form tag and put action instead. and on the top most line '@page' i need to add masterpagefile attribute. All code except for the first line has to be placed in asp:content control with ref to master contentplaceholder...... but what i do if my webpage has style sheet ..i cant remove head tag bcoz it contains style sheet link..and if dont remove style from the head and try to run removing html tags and doctype....the webpage opens in masterpage but on clicking on tab which is in webpage takes me to homepage instead of opening tab. webpage code .aspx

          <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestStandards.aspx.vb"
          Inherits="PATHOLOGY.TestStandards" %>

          Standards

            Test Name:
          
          J Offline
          J Offline
          JHizzle
          wrote on last edited by
          #4

          You'll need to do it programmatically. Make your masterpage have a public class and a public function that will add stylsheets based on a passed in variable. In your content page's code behind, call this function with that page specific CSS.

          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