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. Linking ASP.NET web controls with CSS styles [modified]

Linking ASP.NET web controls with CSS styles [modified]

Scheduled Pinned Locked Moved ASP.NET
wpfquestioncsharpcssasp-net
5 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.
  • C Offline
    C Offline
    Chesnokov Yuriy
    wrote on last edited by
    #1

    There is a external css file with some classes and elements provided. I link it in the master page head section as from MSDN web sites templates:

    After I set in some button controls CssStyle to some of the css classes, in VS design view the style is changed but when the page is run, they are displayed without any styles applied. How to link that stylesheet properly? or what is the problem

    Чесноков

    modified on Friday, August 28, 2009 8:42 AM

    J 1 Reply Last reply
    0
    • C Chesnokov Yuriy

      There is a external css file with some classes and elements provided. I link it in the master page head section as from MSDN web sites templates:

      After I set in some button controls CssStyle to some of the css classes, in VS design view the style is changed but when the page is run, they are displayed without any styles applied. How to link that stylesheet properly? or what is the problem

      Чесноков

      modified on Friday, August 28, 2009 8:42 AM

      J Offline
      J Offline
      janani13
      wrote on last edited by
      #2

      Style sheet design cant be seen in your design page . It will be applied only when the page gets executed. I don't know how to have seen the design of style sheet in your design view. Nothing wrong in your registration with the master page. Post more codes to get clarification.

      C 1 Reply Last reply
      0
      • J janani13

        Style sheet design cant be seen in your design page . It will be applied only when the page gets executed. I don't know how to have seen the design of style sheet in your design view. Nothing wrong in your registration with the master page. Post more codes to get clarification.

        C Offline
        C Offline
        Chesnokov Yuriy
        wrote on last edited by
        #3

        In VS2008 there is addition of design view of your web page as it looks from the source, along with split, where you can watch both source code and the page look.

        "Project.Master file"

        <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GenderAge.master.cs" Inherits="GenderAge.GenderAge" %>

        "Page.aspx file"

        <%@ Page Title="" Language="C#" MasterPageFile="~/Project.Master" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="Page.Main" %>

        Чесноков

        D 1 Reply Last reply
        0
        • C Chesnokov Yuriy

          In VS2008 there is addition of design view of your web page as it looks from the source, along with split, where you can watch both source code and the page look.

          "Project.Master file"

          <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="GenderAge.master.cs" Inherits="GenderAge.GenderAge" %>

          "Page.aspx file"

          <%@ Page Title="" Language="C#" MasterPageFile="~/Project.Master" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="Page.Main" %>

          Чесноков

          D Offline
          D Offline
          DoctorMick
          wrote on last edited by
          #4

          What does the output HTML look like? What are you putting in the head place holder? Is the / missing from the end of due to a cut and paste issue or is it missing from your page as well?

          C 1 Reply Last reply
          0
          • D DoctorMick

            What does the output HTML look like? What are you putting in the head place holder? Is the / missing from the end of due to a cut and paste issue or is it missing from your page as well?

            C Offline
            C Offline
            Chesnokov Yuriy
            wrote on last edited by
            #5

            yes, it misses in the paste operation here. I do not put anything in the head place holder Content1. Should I? After I created the App_Themes folder and put there css file the styles become visible after the page is started. However there is difference between VS2008 design view and the actual page, e.g. marging and padding does not work in some div controls???

            Чесноков

            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