473,508 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email and including a stylesheet

i'm sending email via an aspx page. The format is html. Is there a way to
include a link to a stylesheet? I notice that the
Dim mail As New MailMessage
mail.Body = msg
mail.BodyFormat = MailFormat.Html
will create the correct html headers but i can't figure out how to include a
link to a stylesheet in the head tag.
Any ideas?
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
Nov 19 '05 #1
8 1432
When you build out your html use a string builder. Append to the string
builder all the text for a regular html page with a link to a stylesheet
stored out on your website... Otherwise put all the style tags directly in
the text.

Dim MySB AS New System.Text.StringBuilder

With MySB
.Append("<html>" & vbcrlf)
.Append(vbTab & "<head>" & vbcrlf)
.Append(vbTab & vbTab & "<meta [style link here]>" & vbcrlf)
'---Etc.
End With

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
i'm sending email via an aspx page. The format is html. Is there a way to
include a link to a stylesheet? I notice that the
Dim mail As New MailMessage
mail.Body = msg
mail.BodyFormat = MailFormat.Html
will create the correct html headers but i can't figure out how to include
a
link to a stylesheet in the head tag.
Any ideas?
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes

Nov 19 '05 #2

"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
i'm sending email via an aspx page. The format is html. Is there a way to
include a link to a stylesheet? I notice that the
Dim mail As New MailMessage
mail.Body = msg
mail.BodyFormat = MailFormat.Html
will create the correct html headers but i can't figure out how to include
a
link to a stylesheet in the head tag.
Any ideas?


This is an untested idea ...

Instead of a css link, have you tried to embed your styles right into the
body of the email? Like you can in an HTML page?

John
Nov 19 '05 #3
thanks for responding,

that is an answer, however i was hoping to use the mailmessage object
directly like when you need to add dynamic linkbuttons, or child controls. I
figure the head tag already exists in the mailmessage object (somewhere) so
you should be able to add an <a link ... stylesheet.. /> as a key or somthing.
thanks

--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"S. Justin Gengo" wrote:
When you build out your html use a string builder. Append to the string
builder all the text for a regular html page with a link to a stylesheet
stored out on your website... Otherwise put all the style tags directly in
the text.

Dim MySB AS New System.Text.StringBuilder

With MySB
.Append("<html>" & vbcrlf)
.Append(vbTab & "<head>" & vbcrlf)
.Append(vbTab & vbTab & "<meta [style link here]>" & vbcrlf)
'---Etc.
End With

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
i'm sending email via an aspx page. The format is html. Is there a way to
include a link to a stylesheet? I notice that the
Dim mail As New MailMessage
mail.Body = msg
mail.BodyFormat = MailFormat.Html
will create the correct html headers but i can't figure out how to include
a
link to a stylesheet in the head tag.
Any ideas?
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


Nov 19 '05 #4
thanks for responding
Can do that but can't do that. My designer will kill me, she is very strong
on standardization, which is not a Microsoft srong point. this means style
elements should be in style sheets not in-line.
Seeing as how we are married, hey you get the idea!!!!

but thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"John MacIntyre" wrote:

"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
i'm sending email via an aspx page. The format is html. Is there a way to
include a link to a stylesheet? I notice that the
Dim mail As New MailMessage
mail.Body = msg
mail.BodyFormat = MailFormat.Html
will create the correct html headers but i can't figure out how to include
a
link to a stylesheet in the head tag.
Any ideas?


This is an untested idea ...

Instead of a css link, have you tried to embed your styles right into the
body of the email? Like you can in an HTML page?

John

Nov 19 '05 #5
That's true of a web page. But this isn't a web page is it? I would ask her
if she can point out the standardization that says there should be a
separate style sheet for an email message.

If you need a place to sleep afterward my couch is free and I have beer in
the fridge. Just be quiet so you don't wake up my wife and our five year
old. I have nowhere to go myself! :)

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
thanks for responding
Can do that but can't do that. My designer will kill me, she is very
strong
on standardization, which is not a Microsoft srong point. this means style
elements should be in style sheets not in-line.
Seeing as how we are married, hey you get the idea!!!!

but thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"John MacIntyre" wrote:

"WebBuilder451" <We***********@discussions.microsoft.com> wrote in
message
news:FD**********************************@microsof t.com...
> i'm sending email via an aspx page. The format is html. Is there a way
> to
> include a link to a stylesheet? I notice that the
> Dim mail As New MailMessage
> mail.Body = msg
> mail.BodyFormat = MailFormat.Html
> will create the correct html headers but i can't figure out how to
> include
> a
> link to a stylesheet in the head tag.
> Any ideas?


This is an untested idea ...

Instead of a css link, have you tried to embed your styles right into the
body of the email? Like you can in an HTML page?

John

Nov 19 '05 #6
I'll talk to her and be ready to pay you some of the rent.
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"S. Justin Gengo" wrote:
That's true of a web page. But this isn't a web page is it? I would ask her
if she can point out the standardization that says there should be a
separate style sheet for an email message.

If you need a place to sleep afterward my couch is free and I have beer in
the fridge. Just be quiet so you don't wake up my wife and our five year
old. I have nowhere to go myself! :)

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"WebBuilder451" <We***********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
thanks for responding
Can do that but can't do that. My designer will kill me, she is very
strong
on standardization, which is not a Microsoft srong point. this means style
elements should be in style sheets not in-line.
Seeing as how we are married, hey you get the idea!!!!

but thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"John MacIntyre" wrote:

"WebBuilder451" <We***********@discussions.microsoft.com> wrote in
message
news:FD**********************************@microsof t.com...
> i'm sending email via an aspx page. The format is html. Is there a way
> to
> include a link to a stylesheet? I notice that the
> Dim mail As New MailMessage
> mail.Body = msg
> mail.BodyFormat = MailFormat.Html
> will create the correct html headers but i can't figure out how to
> include
> a
> link to a stylesheet in the head tag.
> Any ideas?

This is an untested idea ...

Instead of a css link, have you tried to embed your styles right into the
body of the email? Like you can in an HTML page?

John


Nov 19 '05 #7
S. Justin,

I agree to that.

My company just developed the world's first and only web-based
"web-page emailer" available at www.jkn.com

You would be amazed to know how much hurdles we had to go through to
get web pages to fit inside of an email so that it will display
properly in all email clients (even web-based ones like Hotmail and
Yahoo Mail)

CSS is only a small part of it. We had a major issue with framesets.
Even Internet Explorer can't email frameset-based web pages. But I am
proud to say that we can at www.jkn.com

Regards,

Jack Murphy

Nov 19 '05 #8
Very nice site/concept, Jack.

Congratulations!

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
<ja*********@jkn.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
S. Justin,

I agree to that.

My company just developed the world's first and only web-based
"web-page emailer" available at www.jkn.com

You would be amazed to know how much hurdles we had to go through to
get web pages to fit inside of an email so that it will display
properly in all email clients (even web-based ones like Hotmail and
Yahoo Mail)

CSS is only a small part of it. We had a major issue with framesets.
Even Internet Explorer can't email frameset-based web pages. But I am
proud to say that we can at www.jkn.com

Regards,

Jack Murphy

Nov 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1416
by: Laurens | last post by:
Hi, I'm writing an XML schema for a format that should allow entire XSL stylesheets to be embedded within a particular element. Example: <cxl xmlns="http://www.mynamespace.com/"...
5
1410
by: hilz | last post by:
Hi, I am trying to style an rss feed. i created a stylesheet, and an xml file. i include the stylesheet and the rss feed file into my xml file. when i open my xml file in IE, everything works...
3
2523
by: danmc91 | last post by:
Hello, I'm new to xml and xslt but that should be obvious from my question. I'm trying to help my wife set up some web pages with some of her art work and what I'm trying to do is find a way...
9
6887
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
20
3117
by: Johan | last post by:
How can I include one XML file into another XML file (on the client side, in Firefox)? I think XInclude is just what I need, but Firefox doesn't support it:...
8
2368
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the...
2
3072
by: groups2 | last post by:
This is a simplified example of an html email, including the header. It seems to render fine in most situations but for some people it is just code. (it seems to be happening with bellsouth...
9
2553
by: Kevin Raleigh | last post by:
I am using phpmailer to output emails. The CSS features work great in OE but a few of the features break down in Yahoo, and Hotmail. Specifically I can't get the underline feature to work on...
10
2043
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.