473,385 Members | 1,645 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,385 software developers and data experts.

Create an HTML file

Does anyone have an example in VB.NET on how to create an HTML file.
Jan 25 '06 #1
6 1329
Actually I would like an example in VB code for ASP.NET

"JackO" wrote:
Does anyone have an example in VB.NET on how to create an HTML file.

Jan 25 '06 #2
What do you mean. An HTML file is simply a text files with elements, so you
should be able generate the necessary string and write it out using the
FileStream. I assume this is not what you are looking for so can you
clarify your question.

"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Actually I would like an example in VB code for ASP.NET

"JackO" wrote:
Does anyone have an example in VB.NET on how to create an HTML file.

Jan 25 '06 #3
Yes, I guess I am looking for an example of the FileStream method that would
take a string and write it out as a *.htm file

"Peter Rilling" wrote:
What do you mean. An HTML file is simply a text files with elements, so you
should be able generate the necessary string and write it out using the
FileStream. I assume this is not what you are looking for so can you
clarify your question.

"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Actually I would like an example in VB code for ASP.NET

"JackO" wrote:
Does anyone have an example in VB.NET on how to create an HTML file.


Jan 25 '06 #4
"JackO" wrote:
Yes, I guess I am looking for an example of the FileStream method that
would
take a string and write it out as a *.htm file


....and the string we're talking about already contains all HTML-tags?

Steven

- - -
Jan 26 '06 #5
You just create a text file with a .htm extension, and write the text to it,
just like you would write to any text file.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
Yes, I guess I am looking for an example of the FileStream method that
would
take a string and write it out as a *.htm file

"Peter Rilling" wrote:
What do you mean. An HTML file is simply a text files with elements, so
you
should be able generate the necessary string and write it out using the
FileStream. I assume this is not what you are looking for so can you
clarify your question.

"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
> Actually I would like an example in VB code for ASP.NET
>
> "JackO" wrote:
>
>> Does anyone have an example in VB.NET on how to create an HTML file.


Jan 26 '06 #6
On Wed, 25 Jan 2006 14:17:06 -0800, "JackO"
<Ja***@discussions.microsoft.com> wrote:
Does anyone have an example in VB.NET on how to create an HTML file.


This is in C#, but it should be reasonably similar to VB:

StreamWriter writer = new
StreamWriter(@"C:\myDirectory\myHTMLFile.htm", false);

writer.WriteLine("<html>");
writer.WriteLine("<head>");
writer.WriteLine(" <title>My HTML Page</title>");
writer.WriteLine("</head>");
writer.WriteLine("<body>");
writer.WriteLine(" <h1>Hello World!</h1>");
writer.WriteLine("</body>");
writer.WriteLine("</html>");

writer.Close();

HTH

rossum
--

The ultimate truth is that there is no ultimate truth
Jan 26 '06 #7

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

Similar topics

1
by: bissatch | last post by:
Hi, I am currently working on a content management system where a user can fill in a form (title, keywords, link text etc. - all the initial attibutes), which when submitted, will go onto create...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
9
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
6
by: windandwaves | last post by:
Hi Folk Some of my clients asked me to create "fancy emails" for them (aka html formatted emails). I know how to make a nice html document, but I had trouble creating a simple way to provide...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
5
by: susinthaa | last post by:
Hi I tried to create a file using sysopen command as the following sysopen( SUSI,'c:\\susi.html',O_RDWR|O_EXCL|O_CREAT, 0755); printf HTML "<html>\n"; printf HTML "<head>\n"; printf HTML...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: TrevRex | last post by:
Hello, I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.