help with ASP code

Discussion in 'ASP General' started by -D-, Sep 15, 2004.

  1. -D-

    -D- Guest

    I have some code that I'm trying to add a CSS pseudoclass style for
    formatting purposes. Here is a snippet of the code I'm trying to add the
    pseudoclass to:

    Dim tmpHTML
    tmpHTML=""
    tmpHTML = tmpHTML & "<table summary="""" id=""calendar"" cellspacing=""0"">"
    & Chr(10)
    tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
    tmpHTML = tmpHTML & "<tr id=""title"">" & Chr(10)
    tmpHTML = tmpHTML & "<th colspan=""7"">" & Chr(10)
    tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    CurMonthName & "," & " "
    tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"
    tmpHTML = tmpHTML & "</th>" & Chr(10) & "</tr>" & Chr(10) & "<tr
    id=""days"">"
    Response.Write(tmpHTML)

    I have setup the following styles for links:

    table#calendar a:link {
    color: #0000FF;
    font-weight: bold;
    background-color: #CDD3C5;
    }
    table#calendar a:visited {
    color: #0000FF;
    font-weight: bold;
    background-color: #CDD3C5;
    }
    table#calendar a:hover {
    background: #860326;
    font-weight: bold;
    color: #FFFFFF;
    }

    I would like to create another pseudoclass that would apply to the links in
    these lines:

    tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    CurMonthName & "," & " "

    tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"

    I've made several attempts without any luck. Can anyone offer any
    suggestions on how I can do this?
    I have the new pseudoclass styles defined as follows:

    ..month a:link {
    ....
    }
    ..month a:visited {
    ....
    }
    ..month a:hover {
    ....
    }

    Thanks for any help.
    -D-
     
    -D-, Sep 15, 2004
    #1
    1. Advertising

  2. Although you're using ASP to response.write your HTML, CSS is off-topic for
    this group. I suggest you take a copy of a view-source and post that to a
    CSS group with your question.

    Ray at home

    "-D-" <> wrote in message
    news:...
    > I have some code that I'm trying to add a CSS pseudoclass style for
    > formatting purposes. Here is a snippet of the code I'm trying to add the
    > pseudoclass to:
    >
    > Dim tmpHTML
    > tmpHTML=""
    > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""

    cellspacing=""0"">"
    > & Chr(10)
    > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
     
    Ray Costanzo [MVP], Sep 15, 2004
    #2
    1. Advertising

  3. -D-

    -D- Guest

    Ray,
    Sorry if the questions was off-topic. I honestly didn't realize that it
    was. I had initially tried some other groups, but to no avail. I felt the
    question was really tailored for an ASP group since I am trying to determine
    how to properly place the CSS class into the ASP code. I did not see that
    is was a CSS question.

    Either way, if so, my apologies. It was unintentional.

    If anyone does read the thread and can help, it would be greatly
    appreciated. Thank you.
    -D-


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:#...
    > Although you're using ASP to response.write your HTML, CSS is off-topic

    for
    > this group. I suggest you take a copy of a view-source and post that to a
    > CSS group with your question.
    >
    > Ray at home
    >
    > "-D-" <> wrote in message
    > news:...
    > > I have some code that I'm trying to add a CSS pseudoclass style for
    > > formatting purposes. Here is a snippet of the code I'm trying to add

    the
    > > pseudoclass to:
    > >
    > > Dim tmpHTML
    > > tmpHTML=""
    > > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""

    > cellspacing=""0"">"
    > > & Chr(10)
    > > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)

    >
    >
     
    -D-, Sep 15, 2004
    #3
  4. Firstly, there's no need to apologize. I wasn't "yelling" or whatever, just
    saying that you should have better luck elsewhere. But, if you didn't, you
    didn't. Damn those CSS people! ;]

    I think that step 1 is to forget about the ASP part of it and just make
    yourself an html file. After you have your CSS issues worked out, then
    worry about response.writing it all out. (I'm not really sure why you're
    response.writing the whole thing anyway instead of taking advantage of the
    interlacing power of ASP!)

    Ray at home

    "-D-" <> wrote in message
    news:...
    > Ray,
    > Sorry if the questions was off-topic. I honestly didn't realize that it
    > was. I had initially tried some other groups, but to no avail. I felt

    the
    > question was really tailored for an ASP group since I am trying to

    determine
    > how to properly place the CSS class into the ASP code. I did not see that
    > is was a CSS question.
    >
    > Either way, if so, my apologies. It was unintentional.
    >
    > If anyone does read the thread and can help, it would be greatly
    > appreciated. Thank you.
    > -D-
    >
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:#...
    > > Although you're using ASP to response.write your HTML, CSS is off-topic

    > for
    > > this group. I suggest you take a copy of a view-source and post that to

    a
    > > CSS group with your question.
    > >
    > > Ray at home
    > >
    > > "-D-" <> wrote in message
    > > news:...
    > > > I have some code that I'm trying to add a CSS pseudoclass style for
    > > > formatting purposes. Here is a snippet of the code I'm trying to add

    > the
    > > > pseudoclass to:
    > > >
    > > > Dim tmpHTML
    > > > tmpHTML=""
    > > > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""

    > > cellspacing=""0"">"
    > > > & Chr(10)
    > > > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)

    > >
    > >

    >
    >
     
    Ray Costanzo [MVP], Sep 15, 2004
    #4
  5. -D-

    -D- Guest

    Thanks Ray,
    The reason behind how the code is written is because I was using a
    Dreamweaver extension for an ASP calendar. The ASP in the original post is
    a portion of the code produced. The entire code for the calendar can be
    placed anywhere within the body of the HTML page. The code for the calendar
    is a function and I call the function into a div within the body of the
    page. Problem is, I was trying to modify and tailor the ASP code in the
    function and place the CSS class style so I could format the calendar
    differently.

    I figure if I keep trying variations, I'll find the solution. Working
    through all those quotations is a nightmare though.
    -D-


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > Firstly, there's no need to apologize. I wasn't "yelling" or whatever,

    just
    > saying that you should have better luck elsewhere. But, if you didn't,

    you
    > didn't. Damn those CSS people! ;]
    >
    > I think that step 1 is to forget about the ASP part of it and just make
    > yourself an html file. After you have your CSS issues worked out, then
    > worry about response.writing it all out. (I'm not really sure why you're
    > response.writing the whole thing anyway instead of taking advantage of the
    > interlacing power of ASP!)
    >
    > Ray at home
    >
    > "-D-" <> wrote in message
    > news:...
    > > Ray,
    > > Sorry if the questions was off-topic. I honestly didn't realize that it
    > > was. I had initially tried some other groups, but to no avail. I felt

    > the
    > > question was really tailored for an ASP group since I am trying to

    > determine
    > > how to properly place the CSS class into the ASP code. I did not see

    that
    > > is was a CSS question.
    > >
    > > Either way, if so, my apologies. It was unintentional.
    > >
    > > If anyone does read the thread and can help, it would be greatly
    > > appreciated. Thank you.
    > > -D-
    > >
    > >
    > > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > > message news:#...
    > > > Although you're using ASP to response.write your HTML, CSS is

    off-topic
    > > for
    > > > this group. I suggest you take a copy of a view-source and post that

    to
    > a
    > > > CSS group with your question.
    > > >
    > > > Ray at home
    > > >
    > > > "-D-" <> wrote in message
    > > > news:...
    > > > > I have some code that I'm trying to add a CSS pseudoclass style for
    > > > > formatting purposes. Here is a snippet of the code I'm trying to

    add
    > > the
    > > > > pseudoclass to:
    > > > >
    > > > > Dim tmpHTML
    > > > > tmpHTML=""
    > > > > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""
    > > > cellspacing=""0"">"
    > > > > & Chr(10)
    > > > > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
    > > >
    > > >

    > >
    > >

    >
    >
     
    -D-, Sep 15, 2004
    #5
  6. -D-

    Ken Schaefer Guest

    What you need to do is a "view source" in your browser and look at the
    output. Work out what is wrong with the output, then work out what you need
    to change in the ASP code that generates the output (this is all assuming
    that you can actually achieve what you want to achieve). So, Ray's
    suggestion is good: just write out plain HTML + CSS that works. Then write
    some ASP code to generate the HTML/CSS.

    Cheers
    Ken

    "-D-" <> wrote in message
    news:...
    > Thanks Ray,
    > The reason behind how the code is written is because I was using a
    > Dreamweaver extension for an ASP calendar. The ASP in the original post
    > is
    > a portion of the code produced. The entire code for the calendar can be
    > placed anywhere within the body of the HTML page. The code for the
    > calendar
    > is a function and I call the function into a div within the body of the
    > page. Problem is, I was trying to modify and tailor the ASP code in the
    > function and place the CSS class style so I could format the calendar
    > differently.
    >
    > I figure if I keep trying variations, I'll find the solution. Working
    > through all those quotations is a nightmare though.
    > -D-
    >
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    > message news:...
    >> Firstly, there's no need to apologize. I wasn't "yelling" or whatever,

    > just
    >> saying that you should have better luck elsewhere. But, if you didn't,

    > you
    >> didn't. Damn those CSS people! ;]
    >>
    >> I think that step 1 is to forget about the ASP part of it and just make
    >> yourself an html file. After you have your CSS issues worked out, then
    >> worry about response.writing it all out. (I'm not really sure why you're
    >> response.writing the whole thing anyway instead of taking advantage of
    >> the
    >> interlacing power of ASP!)
    >>
    >> Ray at home
    >>
    >> "-D-" <> wrote in message
    >> news:...
    >> > Ray,
    >> > Sorry if the questions was off-topic. I honestly didn't realize that
    >> > it
    >> > was. I had initially tried some other groups, but to no avail. I felt

    >> the
    >> > question was really tailored for an ASP group since I am trying to

    >> determine
    >> > how to properly place the CSS class into the ASP code. I did not see

    > that
    >> > is was a CSS question.
    >> >
    >> > Either way, if so, my apologies. It was unintentional.
    >> >
    >> > If anyone does read the thread and can help, it would be greatly
    >> > appreciated. Thank you.
    >> > -D-
    >> >
    >> >
    >> > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    >> > message news:#...
    >> > > Although you're using ASP to response.write your HTML, CSS is

    > off-topic
    >> > for
    >> > > this group. I suggest you take a copy of a view-source and post that

    > to
    >> a
    >> > > CSS group with your question.
    >> > >
    >> > > Ray at home
    >> > >
    >> > > "-D-" <> wrote in message
    >> > > news:...
    >> > > > I have some code that I'm trying to add a CSS pseudoclass style for
    >> > > > formatting purposes. Here is a snippet of the code I'm trying to

    > add
    >> > the
    >> > > > pseudoclass to:
    >> > > >
    >> > > > Dim tmpHTML
    >> > > > tmpHTML=""
    >> > > > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""
    >> > > cellspacing=""0"">"
    >> > > > & Chr(10)
    >> > > > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
    >> > >
    >> > >
    >> >
    >> >

    >>
    >>

    >
    >
     
    Ken Schaefer, Sep 15, 2004
    #6
  7. -D-

    Dave Guest

    "-D-" <> wrote in message
    news:...
    >I have some code that I'm trying to add a CSS pseudoclass style for
    > formatting purposes. Here is a snippet of the code I'm trying to add the
    > pseudoclass to:
    >
    > Dim tmpHTML
    > tmpHTML=""
    > tmpHTML = tmpHTML & "<table summary="""" id=""calendar""
    > cellspacing=""0"">"
    > & Chr(10)
    > tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
    > tmpHTML = tmpHTML & "<tr id=""title"">" & Chr(10)
    > tmpHTML = tmpHTML & "<th colspan=""7"">" & Chr(10)
    > tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    > Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    > CurMonthName & "," & " "
    > tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    > Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"
    > tmpHTML = tmpHTML & "</th>" & Chr(10) & "</tr>" & Chr(10) & "<tr
    > id=""days"">"
    > Response.Write(tmpHTML)
    >
    > I have setup the following styles for links:
    >
    > table#calendar a:link {
    > color: #0000FF;
    > font-weight: bold;
    > background-color: #CDD3C5;
    > }
    > table#calendar a:visited {
    > color: #0000FF;
    > font-weight: bold;
    > background-color: #CDD3C5;
    > }
    > table#calendar a:hover {
    > background: #860326;
    > font-weight: bold;
    > color: #FFFFFF;
    > }
    >
    > I would like to create another pseudoclass that would apply to the links
    > in
    > these lines:
    >
    > tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    > Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    > CurMonthName & "," & " "
    >
    > tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    > Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"
    >
    > I've made several attempts without any luck. Can anyone offer any
    > suggestions on how I can do this?
    > I have the new pseudoclass styles defined as follows:
    >
    > .month a:link {
    > ...
    > }
    > .month a:visited {
    > ...
    > }
    > .month a:hover {
    > ...
    > }
    >
    > Thanks for any help.
    > -D-
    >
    >


    Try the following (note changes to both the CSS and ASP code):

    table#calendar a.month:link {...}
    table#calendar a.month:visited {...}
    table#calendar a.hover:hover {...}

    tmpHTML = tmpHTML & "<a class=""month"" href=""?EventDate=" &
    Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    CurMonthName & "," & " "

    I question where you have the closing tag for the anchor ( the "</a>"), but
    I assume that this is what you want...

    Dave
     
    Dave, Sep 17, 2004
    #7
  8. -D-

    Dave Guest

    "Dave" <> wrote in message
    news:...
    >
    > "-D-" <> wrote in message
    > news:...
    >>I have some code that I'm trying to add a CSS pseudoclass style for
    >> formatting purposes. Here is a snippet of the code I'm trying to add the
    >> pseudoclass to:
    >>
    >> Dim tmpHTML
    >> tmpHTML=""
    >> tmpHTML = tmpHTML & "<table summary="""" id=""calendar""
    >> cellspacing=""0"">"
    >> & Chr(10)
    >> tmpHTML = tmpHTML & "<caption></caption>" & Chr(10)
    >> tmpHTML = tmpHTML & "<tr id=""title"">" & Chr(10)
    >> tmpHTML = tmpHTML & "<th colspan=""7"">" & Chr(10)
    >> tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    >> Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    >> CurMonthName & "," & " "
    >> tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    >> Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"
    >> tmpHTML = tmpHTML & "</th>" & Chr(10) & "</tr>" & Chr(10) & "<tr
    >> id=""days"">"
    >> Response.Write(tmpHTML)
    >>
    >> I have setup the following styles for links:
    >>
    >> table#calendar a:link {
    >> color: #0000FF;
    >> font-weight: bold;
    >> background-color: #CDD3C5;
    >> }
    >> table#calendar a:visited {
    >> color: #0000FF;
    >> font-weight: bold;
    >> background-color: #CDD3C5;
    >> }
    >> table#calendar a:hover {
    >> background: #860326;
    >> font-weight: bold;
    >> color: #FFFFFF;
    >> }
    >>
    >> I would like to create another pseudoclass that would apply to the links
    >> in
    >> these lines:
    >>
    >> tmpHTML = tmpHTML & "<a href=""?EventDate=" &
    >> Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    >> CurMonthName & "," & " "
    >>
    >> tmpHTML = tmpHTML & CurYear & "<a href=""?EventDate=" &
    >> Server.URLEncode(DateAdd("m",1,EventDate)) & """>»</a>"
    >>
    >> I've made several attempts without any luck. Can anyone offer any
    >> suggestions on how I can do this?
    >> I have the new pseudoclass styles defined as follows:
    >>
    >> .month a:link {
    >> ...
    >> }
    >> .month a:visited {
    >> ...
    >> }
    >> .month a:hover {
    >> ...
    >> }
    >>
    >> Thanks for any help.
    >> -D-
    >>
    >>

    >
    > Try the following (note changes to both the CSS and ASP code):
    >
    > table#calendar a.month:link {...}
    > table#calendar a.month:visited {...}
    > table#calendar a.hover:hover {...}
    >
    > tmpHTML = tmpHTML & "<a class=""month"" href=""?EventDate=" &
    > Server.URLEncode(DateAdd("m",-1, EventDate)) & """>«</a>" &
    > CurMonthName & "," & " "
    >
    > I question where you have the closing tag for the anchor ( the "</a>"),
    > but I assume that this is what you want...
    >
    > Dave


    Ooops.

    table#calendar a.hover:hover {...} was supposed to be table#calendar
    a.month:hover {...}
     
    Dave, Sep 18, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=

    Fire Code behind code AND Javascript code associated to a Button Click Event

    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Feb 10, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    21,371
    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=
    Feb 11, 2004
  2. Tee
    Replies:
    1
    Views:
    4,176
    Raterus
    Jun 24, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: help with repeater, how to code it in code-behind page

    Phil Winstanley [Microsoft MVP ASP.NET], Jun 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    493
    Ireney Berezniak
    Jun 25, 2004
  4. keithb
    Replies:
    1
    Views:
    959
    Bruce Barker
    Mar 29, 2006
  5. tone
    Replies:
    4
    Views:
    471
    Hywel Jenkins
    Nov 19, 2003
Loading...

Share This Page