473,395 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Formatting output

I am using a response.write to test the formatting of the output. I am
supposed to get this:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:20051022T090000Z
DTEND:20051022T090000Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:20051022T090000Z
DTEND:20051022T090000Z LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request PRIORITY:3 END:VEVENT
END:VCALENDAR

I am sure I am missing something very simple, but I can't figure out what I
am doing wrong. Here is the code:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf

Any ideas?
TIA!!!
Jul 22 '05 #1
5 3746
If you do a view-source, you'll see the format you're after. Remember
though, HTML doesn't care about line breaks in the source. If you want a
line break to appear in your browser, you have to use the <br> tag or a
block level tag like <div> or <p> or something.

Ray at work

"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:OC**************@tk2msftngp13.phx.gbl...
I am using a response.write to test the formatting of the output. I am
supposed to get this:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:20051022T090000Z
DTEND:20051022T090000Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:20051022T090000Z
DTEND:20051022T090000Z LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request PRIORITY:3 END:VEVENT
END:VCALENDAR

I am sure I am missing something very simple, but I can't figure out what I am doing wrong. Here is the code:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _ "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf

Any ideas?
TIA!!!

Jul 22 '05 #2
"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:OC**************@tk2msftngp13.phx.gbl...
I am using a response.write to test the formatting of the output. I am
supposed to get this:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:20051022T090000Z
DTEND:20051022T090000Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:20051022T090000Z
DTEND:20051022T090000Z LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T090000ZI-request DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request PRIORITY:3 END:VEVENT
END:VCALENDAR

I am sure I am missing something very simple, but I can't figure out what I am doing wrong. Here is the code:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _ "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf

Any ideas?
TIA!!!


strvCalendar = Replace(strvCalendar ,vbCrLf,"<br>")
Jul 22 '05 #3
>I am sure I am missing something very simple, but I can't figure out what I
am doing wrong. Here is the code:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _


VbCrLf isn't recognized in HTML. Use HTML tags, such as <p></p> or
<br> to format HTML code.

Or... Use a <pre></pre> tag to deliver the text as formatted.

Check an HTML group for details if you're unfamiliar with these tags.

Jeff
Jul 22 '05 #4
Here is a little more info, sorry should have explained what my final goal
was. I am creating a .vcs file from a form to import into Outlook. I was
just testing the output on screen then pasting that into a file, after
removing the extra white space, and inserting line breaks. The data is
valid, but the formatting into the file isn't working. Was I doing the
formatting right if I was generating a file? Here is the code again, and
the bit to generate the file:

strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf

Response.ContentType = "text/x-vCalendar"
Response.AddHeader "Content-Disposition", _
"filename=Event" & "cal.vcs"
Response.Write strvCalendar
Response.End

This gernerates an error message in Outlook stating it can't import the
calendar file. But, again, if I paste the data into a text file with a .vcs
extension, and delete white space and insert line breaks I can double click
the file and it imports into Outlook fine, this is why I think I just don't
know how to format the 'output' correctly.

I appreciate the help!!!
Jul 22 '05 #5
"Tom Petersen" wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
: Here is a little more info, sorry should have explained what my final goal
: was. I am creating a .vcs file from a form to import into Outlook. I was
: just testing the output on screen then pasting that into a file, after
: removing the extra white space, and inserting line breaks. The data is
: valid, but the formatting into the file isn't working. Was I doing the
: formatting right if I was generating a file? Here is the code again, and
: the bit to generate the file:
:
: strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
: "VERSION:1.0" & vbCrLf & _
: "BEGIN:VEVENT" & vbCrLf & _
: "DTSTART:" & strStart & vbCrLf & _
: "DTEND:" & strStart & vbCrLf & _
: "LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
: "UID:" & strStart & strSubject & vbCrLf & _
: "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
: "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
: "PRIORITY:3" & vbCrLf & _
: "END:VEVENT" & vbCrLf & _
: "END:VCALENDAR" & vbCrLf
:
: Response.ContentType = "text/x-vCalendar"
: Response.AddHeader "Content-Disposition", _
: "filename=Event" & "cal.vcs"
: Response.Write strvCalendar
: Response.End
:
: This gernerates an error message in Outlook stating it can't import the
: calendar file. But, again, if I paste the data into a text file with a
..vcs
: extension, and delete white space and insert line breaks I can double
click
: the file and it imports into Outlook fine, this is why I think I just
don't
: know how to format the 'output' correctly.
:
: I appreciate the help!!!

Hi Tom...

Does the order matter? Yours is different than the one on this page.

http://www.devx.com/getHelpOn/10Minu...20508/0/page/4

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #6

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

Similar topics

6
by: Tom Petersen | last post by:
Here is a little more info, sorry should have explained what my final goal was. I am creating a .vcs file from a form to import into Outlook. I was just testing the output on screen then pasting...
6
by: shoo | last post by:
Any one know how to do this? thank Write a simple text-formatting program that produces neatly printed output from input text containing embedded command lines that determine how to format the...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
6
by: shoo | last post by:
Any one know how to do this? thank Write a simple text-formatting program that produces neatly printed output from input text containing embedded command lines that determine how to format the...
7
by: ilona | last post by:
Hi all, I store phone numbers in the database as 123447775665554(input mask is used for input, and some numbers have extensions), and I also know from db if the number is Canadian, US, or some...
2
by: Ken Wilson | last post by:
I am writing and .xml file and am not getting the formatting I would like. The portion of the code that is giving me problems is as follows; XmlTextWriter tw = new XmlTextWriter(filename); ...
8
by: Vinay Jain | last post by:
Hi.. I am newbe in postgresql so please help me though the question may be very easy to answer.. Is there any formatting function to get output with fix lengths..for example my query is.. schema...
9
by: sck10 | last post by:
Hello, I have a page with an ImageButton that is used to redirect to another page. When the page first opens, everything looks as expected. However, when I click on the image, the new page...
6
by: Rafael Olarte | last post by:
The goal of this project is to output the following information as follows: 34.5 38.6 4.1 42.4 3.8 close 46.8 4.4 big change. The values of the first colunm are obtain from a file...
1
by: AJG | last post by:
Hi there. I am using a library called SOCI that has a method to set a stream which it uses to log SQL queries. The signature is as follows: void setLogStream(std::ostream *s); This works great...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.