1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Including a CSS based menu in my webpage

Discussion in 'C#' started by pratik, Jan 5, 2006.

  1. #1
    hey all

    i am wrkin on a website using asp.net (vs.net) and i have made a menu using css in an html file.. the css in saved seprately from the html file...

    is there a way by which i can include the html menu in my aspx page... like asp has #include command.. wht command does asp.net uses.. ?? :confused:
     
    pratik, Jan 5, 2006 IP
  2. cytech

    cytech Guest

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm no ASP exert but I always see this used:

    <!--#include file="FILENAME.EXTENSION" -->
     
    cytech, Jan 6, 2006 IP
  3. pratik

    pratik Notable Member

    Messages:
    2,303
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #3

    thankz ...

    but thtz use is asp... m lokin for asp.net
     
    pratik, Jan 7, 2006 IP
  4. pairbrother

    pairbrother Well-Known Member

    Messages:
    386
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    110
    #4
    i thought css files were included using the
    <link rel="stylesheet" href="style.css" type="text/css">
    is it done differently in aspx?

    btw y not just google it .;)
     
    pairbrother, Jan 7, 2006 IP
  5. riz

    riz Peon

    Messages:
    82
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #5
    pairbrother is correct. That is the way to include a css file in aspx files. If you need to use vs.net to add the link do the following:

    1: Open the aspx file in Design view
    2: Go to Format > Document Styles …
    3: In the resulting dialogue box, click the Add Style Link
    4: In the resulting Select Style Sheet dialogue box, select the style sheet you want to link and press ok.

    Check the aspx file in HTML view to make sure that the link was added correctly.
     
    riz, Jan 9, 2006 IP
  6. pratik

    pratik Notable Member

    Messages:
    2,303
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #6
    thankz a lot it wrked... :D
     
    pratik, Jan 18, 2006 IP
  7. riz

    riz Peon

    Messages:
    82
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You are welcome.
     
    riz, Jan 19, 2006 IP
  8. roy77

    roy77 Active Member

    Messages:
    1,088
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    78
    #8
    glad to see that your problem is solved :)
     
    roy77, Jan 6, 2007 IP
  9. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #9
    For later reference, you should be using a Master Page (If in 2.0) - It acts like a global wrapper, where you can throw your header and footer. (They also have a code-behind so you hvae a nice hook for global functionality here)
     
    ccoonen, Jan 7, 2007 IP