473,468 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to create multiple HTML files in c#.net

17 New Member
i have a database having records of no. of people. i have to create no. of HTML files depending upon the no. of rows retrieved from database. i m creating a single html file using
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.  StringBuilder HTML = new StringBuilder();
  4. String NewLine = System.Environment.NewLine;
  5. HTML.Append("<HTML>" + NewLine + "<head>" + NewLine);
  6.     HTML.Append("<title>" + client_name + "</title>" + NewLine + "</head>" + NewLine);
  7. HTML.Append("<body style='FONT-FAMILY: verdana'>" + NewLine);
  8. HTML.Append("</body>" + NewLine + "</html>");
  9.  Response.AppendHeader("content-disposition", "attachment; filename=" + userfilename);
  10.         Response.ContentType = "text/plain";
  11.         Response.Write(HTML.ToString());
  12.         Response.Flush();
  13.         Response.End();
  14.  
  15.  
  16.  
this creates a single file asking whether to save or open the file.
if i keep this code inside a loop,only the first file is created and dialog box does not asks for second file. my requirement is as follows:-
if a person selects 25 records then i don't want this prompt to come up,instead the 25HTML files should be created automatically and saved in the specified folder( to be provided by the user).
it should not ask the suer whether to save or open.
Sep 3 '07 #1
0 5480

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: John A Fotheringham | last post by:
I'm trying to write a procedure that having created a new database, will then create within that new database all the tables and procedures that go with it. In doing this I'm hitting the problem...
1
by: Charlie | last post by:
Hello, I have data in an Access table that I would like to export to multiple HTML tables. I would like to split the data in the Access table (about 92,000 records) into multiple HTML...
3
by: Ryan Ternier | last post by:
Hey, Is there a way to upload multiple files with .net? Currently, with the HTML way, you can uplaod 1 file at a time. We were looking for a system where a user can select multiple files (hold...
6
by: Rich | last post by:
Hello, I want to simulate the dynamic thumbnail display of Windows Explorer (winxp) on a form or pannel container. If I place a picture box on my container form/pannel and dimension it to the...
7
by: crowl | last post by:
Hi there, I am looking for a component allowing me uploading multiple files by my asp page. I have found several components achieving this by require a <input type="file" name="FileX"> field for...
0
by: Xah Lee | last post by:
Interactive Find and Replace String Patterns on Multiple Files Xah Lee, 2006-06 Suppose you need to do find and replace of a string pattern, for all files in a directory. However, you do not...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
2
by: daydreaming | last post by:
Hi all, I need some help. I have the index html page which has many <a> tags linking to other html pages. There is a need to create the printer friendly page by putting the contents of index file...
4
by: henry | last post by:
Folks: As a follow-up to my recent posts, I want to ask some more general questions about multiple instances of a CSS link in a page as seen by browsers due to server-side file inclusion. Let...
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
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...
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
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...
1
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.