Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > help with ASP code

Reply
Thread Tools

help with ASP code

 
 
-D-
Guest
Posts: n/a
 
      09-15-2004
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-


 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-15-2004
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)



 
Reply With Quote
 
 
 
 
-D-
Guest
Posts: n/a
 
      09-15-2004
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)

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-15-2004
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)

> >
> >

>
>



 
Reply With Quote
 
-D-
Guest
Posts: n/a
 
      09-15-2004
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)
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Ken Schaefer
Guest
Posts: n/a
 
      09-15-2004
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)
>> > >
>> > >
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      09-16-2004

"-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


 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      09-18-2004

"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 {...}



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between code inside a <script> tag and code in the code-behind file? keithb ASP .Net 1 03-29-2006 01:00 AM
Call a DLL LIB function in ASP.NET (Code Behind) or VB.NET (The same code is working fine in VB 6.0) Peri ASP .Net 2 07-20-2005 03:13 AM
server side code access the text of <asp:label> changed by client-side javascript code? nick ASP .Net 3 12-15-2004 06:26 PM
HTML code warnings in asp.net html code view Craig Kenisston ASP .Net 3 10-07-2004 04:05 PM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57