473,699 Members | 2,801 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:2005102 2T090000Z
DTEND:20051022T 090000Z
LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request
DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:2005102 2T090000Z
DTEND:20051022T 090000Z LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=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:VCALENDA R" & vbCrLf & _
"VERSION:1. 0" & vbCrLf & _
"BEGIN:VEVE NT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCOD ING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;EN CODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODI NG=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3 " & vbCrLf & _
"END:VEVENT " & vbCrLf & _
"END:VCALEN DAR" & vbCrLf

Any ideas?
TIA!!!
Jul 22 '05 #1
5 3755
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.sd bor.edu> wrote in message
news:OC******** ******@tk2msftn gp13.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:2005102 2T090000Z
DTEND:20051022T 090000Z
LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request
DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:2005102 2T090000Z
DTEND:20051022T 090000Z LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=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:VCALENDA R" & vbCrLf & _
"VERSION:1. 0" & vbCrLf & _
"BEGIN:VEVE NT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCOD ING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;EN CODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _ "SUMMARY;ENCODI NG=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3 " & vbCrLf & _
"END:VEVENT " & vbCrLf & _
"END:VCALEN DAR" & vbCrLf

Any ideas?
TIA!!!

Jul 22 '05 #2
"Tom Petersen" <pe****@sdsd.sd bor.edu> wrote in message
news:OC******** ******@tk2msftn gp13.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:2005102 2T090000Z
DTEND:20051022T 090000Z
LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request
DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR

But instead I get this:
BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT DTSTART:2005102 2T090000Z
DTEND:20051022T 090000Z LOCATION;ENCODI NG=QUOTED-PRINTABLE:Libra ry
UID:20051022T09 0000ZI-request DESCRIPTION;ENC ODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODIN G=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:VCALENDA R" & vbCrLf & _
"VERSION:1. 0" & vbCrLf & _
"BEGIN:VEVE NT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCOD ING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;EN CODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _ "SUMMARY;ENCODI NG=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3 " & vbCrLf & _
"END:VEVENT " & vbCrLf & _
"END:VCALEN DAR" & vbCrLf

Any ideas?
TIA!!!


strvCalendar = Replace(strvCal endar ,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:VCALENDA R" & 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:VCALENDA R" & vbCrLf & _
"VERSION:1. 0" & vbCrLf & _
"BEGIN:VEVE NT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCOD ING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;EN CODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODI NG=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3 " & vbCrLf & _
"END:VEVENT " & vbCrLf & _
"END:VCALEN DAR" & vbCrLf

Response.Conten tType = "text/x-vCalendar"
Response.AddHea der "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******** ********@TK2MSF TNGP10.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:VCALENDA R" & vbCrLf & _
: "VERSION:1. 0" & vbCrLf & _
: "BEGIN:VEVE NT" & vbCrLf & _
: "DTSTART:" & strStart & vbCrLf & _
: "DTEND:" & strStart & vbCrLf & _
: "LOCATION;ENCOD ING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
: "UID:" & strStart & strSubject & vbCrLf & _
: "DESCRIPTION;EN CODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
: "SUMMARY;ENCODI NG=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
: "PRIORITY:3 " & vbCrLf & _
: "END:VEVENT " & vbCrLf & _
: "END:VCALEN DAR" & vbCrLf
:
: Response.Conten tType = "text/x-vCalendar"
: Response.AddHea der "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
1736
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 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? I need it to create the .vcs...
6
2958
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 output; all lines begin with a period are command lines. The task of the program is to collect words from input lines, fill output lines with those words, adjust the margins, and print the result. Your programs should handle the commands shown...
8
3531
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 the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
6
2724
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 output; all lines begin with a period are command lines. The task of the program is to collect words from input lines, fill output lines with those words, adjust the margins, and print the result. Your programs should handle the commands shown...
7
398
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 other country. When I retrieve the phone numbers, I need to display them as (###) ###-#### x 99999 if it is a Canadian number or (###) ###-#### Ext. 99999 if it is US phone number. Potentially I'd have other countries added as well which might have...
2
6322
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); tw.Formatting = Formatting.Indented; tw.WriteStartDocument(); tw.WriteStartElement("MyRoot"); tw.WriteStartElement("MyString);
8
2026
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 is: Student (name Varchar, age integer);
9
3203
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 opens as expected. However, when I go back to the original page, all the font sizes are larger. Its as if by clicking on the ImageButton, my CSS formatting was discarded. When I look at the source for the following code, this is what I get:
6
1882
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 called: tempInput.txt, and then the information is calculated, and it is output on a different file called tempOutput.txt. The tempInput.txt containg those numbers as follows:
1
3441
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 when used with something like setLogStream(&std::cerr). However, I would like to add more context to the query logged. Specifically, I'd like to add the thread ID. So, instead of the query logged looking like:
0
8686
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9173
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5872
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4375
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2345
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.