Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > hidden characters in a textbox


Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2003, 04:54 PM
branson branson is offline
Newcomer
 
Join Date: Dec 2003
Posts: 3
Default hidden characters in a textbox


I'm writing a program that palces some HTML code into a textbox. Then I save the text in the textbox to a file.html. Why? I plan to make hundreds of similar html pages w/ only the title and the image changed. When I do this, the html code has extra quotes in it. how do I get rid of them?

EXAMPLE CODE: (img code not included)

dim name, wrap as string
wrap=chr(13) & chr(10)

page="<html" & wrap & _
"<head>" & wrap & _
"<title>" & name & "</title>" & wrap & _
"</head>" & wrap & _
"<body>" & wrap & _
"<p><font face=""century gothic"" <b>" & name & "</b>" & _
"</font></p>" & wrap & _
"</body>" & wrap & _
"</html>"

text1=page

I then use commondialog to save the text in text1 as an html file. Now, the problem is the quotes before the first <html> tag as well as the last <html> tag appear in the html source code. Also, the quotes around the font "century gothic", that I need to make it a string, appear in the source code. I have no idea what to do in this situation. All wisdom welcome. Feel free to clown me!
Reply With Quote
  #2  
Old 12-17-2003, 06:12 PM
VBJoe's Avatar
VBJoe VBJoe is offline
Village VB Idiot

* Expert *
 
Join Date: Jan 2003
Location: Idaho
Posts: 1,850
Default

Use the Print command rather than the Write command when outputting the text to the file.

If you want to imbed the double quote character in your output, either concatenate Chr$(34) or put three quotes one after the other:
Code:
"<p><font face="""century gothic""" <b>" & name & "</b>" & _
BTW, use the [ vb] and [ /vb] tags when showing code. (without the space)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden Characters in Word Table skilit Word, PowerPoint, Outlook, and Other Office Products 3 08-25-2003 01:45 PM
Foreign characters in Textbox alexdaman General 4 03-18-2003 06:59 AM
disallowing certain characters in a textbox? gilly General 9 10-21-2002 06:08 PM
Reding and editing characters in a textbox Bonzo General 6 12-15-2001 12:01 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->