Click here to Skip to main content
Click here to Skip to main content

ASP.NET generating Dynamic word Documents

By , 23 May 2006
 

Introduction

This is my first article to the Tech World.

 

This document will help programmers to dynamically create documents using word template without generating any word object on the server.

 

Background

 

In some web applications it is required to create a document generated dynamically, like an Offer letter given to the candidate, some other official letters used during the interviewing purpose, or mark sheet templates etc.

 

In such type of documents most of the things are similar except for few changes.

Let’s take some examples.

 

1.Mark Sheet: Name, Marks Scored, Seat Number etc will change from student to student but other details like the Exam name, stream , university name etc. will remain same.

 

2. Offer letter:  The name, address, post date of offer and date of joining, designation and pay structure etc. will change from candidate to candidate. But other details will remain same.

 

 

Solution

 

To generate O/P for such type of requirement follow a step wise procedure given below.

 

Step1: Create A Word Template

 

           Why Word template?

            

I.                    It is very easy to generate formatted O/P in word.

II.                 Sub scripts and super scripts e.g. ™ can be easily written.

III.               Maintenance of such documents can be easily done, if changes arise.

           

 

 

 

 

How to Create Template?

 

e.g.

1.  Offer Letter:

 

##Address##,                                                              ##DOF##

 

Dear ##Name##,

 

We are glad to appoint you for the designation ## desig ##.

 

  1. Mark sheet:

 

Name: ##NAME##

 

Seat Number: ##Number##

 

Subject1     ##SUB1##          

Subject2     ##SUB2##

Subject3     ##SUB3##

Subject4     ##SUB4##

Subject5     ##SUB5##

 

Total           ##Total##

Percentage: ##PER##

 

 

In the e.g.1 we see ##Address##, ##DOF##, ##NAME## and ##desig##. All these will be replaced by dynamic data selected by the user. Whereas the static data will remain the same.

 

Similarly in example 2. for Mark sheet

##SUB1## , ##SUB2##  , ##SUB3##      etc. will be dynamic.

 

This dynamic data can be made available from the database.

 

Once you have formatted your template file in word as per the guidelines outlined above save the file. Provide appropriate name to the file.

 

Note: The saving format should be Rich Text Format(RTF). Click on File – select save as and then select the path and save the file as .rtf extension file.

 

 

 

Step2: Proceed with the code & instructions given below

 

Make use of file scripting object to copy the template file into some temporary file.

 

Note: The path of the temporary file should be fixed and it should also have a .rtf extension as the template file.

 

‘ Declare a scripting object.

Dim td = Server.CreateObject("Scripting.FileSystemObject")

 

‘Copy File

td.CopyFile(Server.MapPath(".") & "Template.rtf", Server.MapPath(".") & "Temporary.rtf")

 

‘ set the file path in a string variable.

            strFilePath = Server.MapPath(".") & "Temporary.rtf"

 

 

 

‘Now open the termporary file in Read mode.

Dim fs2 As New FileStream(strFilePath, FileMode.Open, FileAccess.Read)

 

'Declare d as a stream Reader

            Dim d As New StreamReader(fs2)

 

Dim swrtarget As String

 

'Initialise the stream reader d to the begining of the file.

            d.BaseStream.Seek(0, SeekOrigin.Begin)

            swrtarget = d.ReadToEnd 'Read the file from Start to End in one go.

            d.Close() ' Close the Stream Reader

 

 

Declare string variables say,

Str1ans strvalue1.

Now get the values from database.

Use can use a select query and a data reader to get the values.

 

Now set the file path to the Temporary file

'Set the path to open Temporary

            strFilePath = Server.MapPath(".") & "Temporary.rtf"

 

‘Open the temporary file in Read-Write Mode.

Dim fs1 As New FileStream(strFilePath, FileMode.Open, FileAccess.ReadWrite)

 

Dim s As New StreamWriter(fs1) 'Declare a Stream Writer.

 

'Replace the values with the values in the string read from Temporary.

While myReader.Read

 

Strvalue1= myReader.GetValue(0).ToString()

                Str1= Replace(swrtarget.ToString, ##Address##", Trim(strvalue1)

                Strvalue1= myReader.GetValue(1).ToString()

                str1= Replace(str.ToString, ##Name##", Trim(strvalue1)

 

Similarly it will come for ##DOF## and ##desig###.

 

End While

 

Close the Reader.

Close the Connection.

 

' After replacing all the values write these values in the file2.rtf via the file write (s).

            s.WriteLine(str)

            'After writing the data in the stream writer the values must be flushed.

            s.Flush()

            'Close the stream writer.

            s.Close()

            fs1.Close()

            fs2.Close()

 

 

Now copy the details into the final file.

This file can be a .dc file.

 

Dim td1 = Server.CreateObject("Scripting.FileSystemObject")

        td1.CopyFile(Server.MapPath(".") & "Temporary.rtf", Server.MapPath(".") & "final.doc")

        'Open a new window in the browser and display final.doc file to the  user.

        strtargetFilepath = " finalletter.doc"

        Response.Write("<script> window.open('" & strtargetFilepath & "') </script>")

 

 Main Code Sippnet

******************************************************************************************************************************************************

Public Sub GetOutput()

        Dim strFilePath As String   'Declare string variable to store file path.

        Try

 

            Dim strvalue As String

            Dim myReader As OleDb.OleDbDataReader

            Dim SqlStr1 As String

            Dim Srefno As String

            Srefno = Nothing

            ' Declare a file system object say td.

            Dim td = Server.CreateObject("Scripting.FileSystemObject")

            ' Copy the template file temp2.rtf into file2.rtf.

            td.CopyFile(Server.MapPath(".") & "/temp2.rtf", Server.MapPath(".") & "/file2.rtf")

           

 

            ' Set file path to file2.rtf.

            strFilePath = Server.MapPath(".") & "file2.rtf"

            ' Get the refno into Srefno variable.

            Srefno = Session("RefNo")

            Dim strString As String

            Dim cmd As OleDbCommand

            'Open file2.rtf in read mode.

            Dim fs2 As New FileStream(strFilePath, FileMode.Open, FileAccess.Read)

            'Declare d as a stream Reader

            Dim d As New StreamReader(fs2)

            'A string variable used to store all the values received from the file fiel2.rtf.

            Dim swrtarget As String

            ' This variable str will store all the values from the 2nm till final.

            ' Finally the string writer will write the values stored in the str variable.

            Dim str As String

 

            'Initialise the stream reader d to the begining of the file.

            d.BaseStream.Seek(0, SeekOrigin.Begin)

            swrtarget = d.ReadToEnd 'Read the file from Start to End in one go.

            d.Close() ' Close the Stream Reader

 

 

            Dim SqlStr As String

            Dim srno As String

 

 

            SqlStr = " Your Query HERE"

            clsCon.OpenCon(ConfigurationSettings.AppSettings("strConnection").ToString)

            cmd = New OleDb.OleDbCommand(SqlStr, clsCon.Con)

            myReader = cmd.ExecuteReader

 

 

            'Set the path to open file2.rtf

            strFilePath = Server.MapPath(".") & "file2.rtf"

            'Open file file2.rtf in Read Write Mode

            Dim fs1 As New FileStream(strFilePath, FileMode.Open, FileAccess.ReadWrite)

 

            Dim s As New StreamWriter(fs1) 'Declare a Stream Writer.

            'Now Read values from database i.e. table--> tblofferletter in the string variable strvalue.

            'Replace the values with the values in the string read from file2.rtf

            While myReader.Read

                strvalue = myReader.GetValue(0).ToString()

                str = Replace(swrtarget.ToString, "##refno##", Trim(strvalue))

                strvalue = myReader.GetValue(1).ToString()

                str = Replace(str.ToString, "##Title##", Trim(strvalue))

                strvalue = myReader.GetValue(2).ToString()

                str = Replace(str.ToString, "##FirstName##", Trim(strvalue))

                strvalue = myReader.GetValue(3).ToString()

                str = Replace(str.ToString, "##LName##", Trim(strvalue))

                strvalue = myReader.GetValue(4).ToString()

               

            End While

            myReader.Close()

            cmd.Dispose()

 

            ' After replacing all the values write these values in the file2.rtf via the file write (s).

            s.WriteLine(str)

            'After writing the data in the stream writer the values must be flushed.

            s.Flush()

            'Close the stream writer.

            s.Close()

            fs1.Close()

            fs2.Close()

 

            'Initialise the srefno to nothing so that when new report is requested it will have the latest value.

            Srefno = Nothing

 

 

        Catch ex As Exception

            Response.Write("" + ex.Message)

                  Response.Write("")

 

        Finally

            ' Response.Write("OFFER LETTER GENERATED SUCCESSFULLY.")

                  clsCon.closeCon()

                 

        End Try

 

    End Sub

 

************************************************************************************

 

Advantages

 

  1. Easy maintainability – Changes in the template can be made easily and updated.
  2. Just Few Lines of code.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Nil_Gup
Web Developer
India India
Respectfully Yours,
Nilesh J. Gupte
(B.E. Computer Engg.)

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionHow to print?memberdollargetdollar201120-Oct-11 22:24 
i have used the code above , it works fine and can replace the words in rtf file , but how can I print the final rtf that saved in a web server?
QuestionHow to add rows and write content in perticular cell of inserted rows?memberamit_834-Mar-11 20:18 
Hi,
if my word template has a table and table has a row with 4 cell, and if i wanted to add the rows in table dynamically then
how can do this?
And
How do we write the content into the cell of inserted rows?
QuestionGenerate word table filled with datamemberkrotas7-Sep-09 8:21 
How is it possible to have table with one row in template rtf file and load data from database and have table filled with data?
AnswerRe: Generate word table filled with datamemberJohnny Glenn11-Apr-12 22:18 
Hi,
 
with this C# / VB.NET Word library, it is possible to create Word file from a DOCX template (not RTF yet) with data imported from a DataTable (that could come from a database) with a .NET mail merge.
 
Here is a sample code how to do it in ASP.NET Word environment:
// Use the component in free mode.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
 
// Define DataTable with two columns: 'Name' and 'Surname', and fill it with some data.
// You don't have to do this if you already have a DataTable instance.
var dataTable = new DataTable("People")
{
  Columns =
  {
    new DataColumn("Name", typeof(string)),
    new DataColumn("Surname", typeof(string))
  },
  Rows =
  {
    new object[] { "John", "Doe" },
    new object[] { "Fred", "Nurk" },
    new object[] { "Hans", "Meier" },
    new object[] { "Ivan", "Horvat" }
  }
};
 
// Create and save a template document. 
// You don't have to do this if you already have a template document.
// This code is only provided as a reference how template document should look like.
var document = new DocumentModel();
document.Sections.Add(
  new Section(document,
    new Table(document,
      new TableRow(document,
        new TableCell(document,
          new Paragraph(document, "Name")),
        new TableCell(document,
          new Paragraph(document, "Surname"))),
      new TableRow(document,
        new TableCell(document,
          new Paragraph(document,
            new Field(document, FieldType.MergeField, "RangeStart:People"),
            new Field(document, FieldType.MergeField, "Name"))),
        new TableCell(document,
          new Paragraph(document,
            new Field(document, FieldType.MergeField, "Surname"),
            new Field(document, FieldType.MergeField, "RangeEnd:People")))))));
// Instead use:
// Load a template document from application's root directory.
// var document = DocumentModel.Load(Path.Combine(Request.PhysicalApplicationPath, "TemplateDocument.docx"), LoadOptions.DocxDefault);

// Mail merge template document with DataTable.
// Important: DataTable.TableName and RangeStart/RangeEnd merge field names must match.
document.MailMerge.ExecuteRange(dataTable);
 
// Microsoft Packaging API cannot write directly to Response.OutputStream.
// Therefore we use temporary MemoryStream.
using (MemoryStream documentStream = new MemoryStream())
{
  document.Save(documentStream, SaveOptions.DocxDefault);
 
  // Stream file to browser.
  Response.Clear();
  Response.ContentType = "application/vnd.openxmlformats";
  Response.AddHeader("Content-Disposition", "attachment; filename=Document.docx");
 
  documentStream.WriteTo(Response.OutputStream);
 
  Response.End();
}

Generalrtf formatting problemmemberdimi-d10-Jun-09 0:56 
Hi,
 
Thanks for the article.
I have a problem, my rtf file is giving me weird data.
 
rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset161{\*\fname Times
 
any idea what might be causing this?
Generalchange text font in output filememberwinnc23-Mar-09 4:25 
How to change the text font in output file, say I read in the "##refno##",I replac it with "*123*", in my output file I need to change "*123*" into font "C39HrP24DhTt"?
 
Thanks.
GeneralRe: change text font in output filememberNil_Gup23-Mar-09 6:45 
Hi winnc,
 
The font should be in the document itself. The RTF reader will replace the data. e.g. if it is bold then ##ref## (should be in bold along with its font e.g. verdana).
 
Nilesh J. Gupte

GeneralRe: change text font in output filememberwinnc24-Mar-09 5:23 
In my output file I have to use "C39HrP24DhTt" ( a barcode font) for ##ref##. When I change the font in the input file the "string.replace" doesn't recongnize this font. That's why I'm thinking to replace the data first then on the way to write to the output file changing the font.
GeneralRe: change text font in output filememberNil_Gup24-Mar-09 7:28 
If you are using a RTF "rich text file" then check the desired font is supported by RTF file format. Installing it explicitly too may help. If you check the final replacement string prior writing (in some intermediate window), then you can be a more clearer picture like the how a bold text , different font text will appear.
 
Nilesh J. Gupte

GeneralMultiple PagesmemberChesty177530-Jan-09 3:53 
I can get this project to work for one letter at a time, but what if I need to print 50 or 100 at a time? The only one that I get is the firs one through the while loop.
GeneralRe: Multiple Pages Working Code in C#memberChesty177530-Jan-09 10:39 
public void GetOutput()
{

string strFilePath = null;

try
{
string strvalue = null;
 
// Declare a file system object say td.
var td = Server.CreateObject("Scripting.FileSystemObject");
 
// Copy the template file temp2.rtf into file2.rtf.
File.Copy(Server.MapPath("Templates/Template.rtf"), Server.MapPath("file2.rtf"));
 
// Set file path to file2.rtf.
strFilePath = Server.MapPath(".") + "/file2.rtf";
 
//Open file2.rtf in read mode.
FileStream fs2 = new FileStream(strFilePath, FileMode.Open, FileAccess.Read);
 
//Declare d as a stream Reader
StreamReader d = new StreamReader(fs2);
 
//Initialise the stream reader d to the begining of the file.
d.BaseStream.Seek(0, SeekOrigin.Begin);
 
//A string variable used to store all the values received from the file file2.rtf.
string swrtarget = null;
 
//Read the file from Start to End in one go.
swrtarget = d.ReadToEnd();
 
// Close the Stream Reader
d.Close();

 
//grab the portion of the template that needs to be repeated
//look at the rtf file and determine which section will repeat the data you want repeated
//using page breaks in the template, I was able to key off of "page" to find my indexes
int beginInsert = swrtarget.IndexOf("page }") + 7;
int endInsert = swrtarget.Length - 7;
int insertLength = endInsert - beginInsert;
string insert = swrtarget.Substring(beginInsert, insertLength);
 
//Response.Write(insert);
 
//I used a dataset and SQLClient instead of OleDb and ExecuteReader
DataSet ds = new DataSet();
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand sqlComm = new SqlCommand();
sqlComm.Connection = conn;
sqlComm.CommandType = CommandType.StoredProcedure;
sqlComm.CommandText = "Stored Proc Here";
 
try
{
sqlComm.Connection.Open();
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter(sqlComm);
mySqlDataAdapter.Fill(ds, "Table");
}
catch (Exception ex)
{
Response.Write(" SQL error = " + ex.Message);
}
finally
{
sqlComm.Connection.Close();
}

//Set the path to open file2.rtf
strFilePath = Server.MapPath(".") + "/file2.rtf";
 
//Open file file2.rtf in Read Write Mode
FileStream fs1 = new FileStream(strFilePath, FileMode.Open, FileAccess.ReadWrite);
 
//Declare a Stream Writer.
StreamWriter s = new StreamWriter(fs1);
 
//This variable str will store all the values from the 2nm till final.
string str = null;
 
//Replace the values with the values in the string read from file2.rtf
int i = 0;
 
foreach (DataRow row in ds.Tables[0].Rows)
{
//make str equal to the template file
if (i == 0)
{
str = str + swrtarget;
i++;
}
else
{
//inserts the repeatable portion of the TemplateBuilder that was caluclated above
str = str.Insert(str.Length - 7, insert);
}
 
strvalue = row["dateline"].ToString();
str = str.Replace("##Address##", strvalue);
 
strvalue = row["lastname"].ToString();
str = str.Replace("##Name##", strvalue);
 
strvalue = row["occupation"].ToString();
str = str.Replace("##desig##", strvalue);
 
}
 
// After replacing all the values write these values in the file2.rtf via the file write (s).
s.WriteLine(str);
 
//After writing the data in the stream writer the values must be flushed.
s.Flush();
 
//Close the stream writer.
s.Close();
fs1.Close();
fs2.Close();
 
// Response.Write("OFFER LETTER GENERATED SUCCESSFULLY.")
}
 
catch (Exception ex)
{
Response.Write("" + ex.Message);
}
 
finally
{
//Response.Redirect()
}
 
}
Questionproblem converting the while loop to aspx / c#memberhvemmig26-Jan-09 22:27 
Hello
 
i have a problem with the code. i got it all working, connecting to the database and reading / writing to the file.
 
My problem is when i try to replace more than one field, it only replace the last. i would think that the problem is in my while loop, but i cant get it to work. This is my loop, can someone help me get it right?
 
while (myReader.Read())
        {
            strvalue = myReader.GetValue(2).ToString();
            string str = Regex.Replace(swrtarget, "##contact##", strvalue);
            strvalue = myReader.GetValue(1).ToString();
            str = Regex.Replace(swrtarget, "##name##", strvalue);
           
        // After replacing all the values write these values in the file2.rtf via the file write (s).
        }
        s.WriteLine(str);
 
any help will be greatly appreciated
 
/Hvemmig?
Generalerror with ur codemembervijaylumar8-Jun-08 21:01 
hi
 
its very easy and good article.
i thanks u alot
 
but for the first execution u r code is running fine.
but for the 2nd time it is giving the error
like...
 
Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED)
 
then i given permissions like this
 
Public Sub givepermission()
Dim fp As Permissions.FileIOPermission
Try
fp = New Permissions.FileIOPermission(Permissions.PermissionState.Unrestricted)
fp.Demand()
Catch e1 As Exception
MsgBox(e1.Message)
End Try
 
End Sub
 

then also it is giving the same error.....
plz help me...
 
note.: after saving to "final.doc" , i m mailing this file as file attachment
 
plz solve it,,,,
 
and send me a solution
 
thanks in advance
vijay d
GeneralDid not replace my textmemberRyanJay15-Aug-07 20:57 
Code doesnt work. My text remains ##Name##. All steps has been fallowed and no errors encountered.
GeneralRe: Did not replace my textmemberNil_Gup16-Aug-07 5:04 
Hi RyanJay,
 
Please try poviding a space in your template file.
 
Nilesh J. Gupte

QuestionFiles size and formattingmemberGorata23-Apr-07 23:40 
Hi
 
I am testing your method and have a few of issues:
1) When saving the .doc as .rtf the file size jumped from 194kb to 2188kb. This is a lot of data to be moving around on the web especially as there may be anything thing between 10 to 30 actions occurring at the same time.
2)The text that was entered in the database was cut and pasted from the .rtf. When it was written onto the template with the streamwriter all the formatting was lost. Is there a way to enter the data and ensure formatting is stored in the database and written by the writer?
3) I aslo seem to be experiencing an issue when two or more people attempt to access the same file. The first browser goes blank. Not sure if this is only because of my test environment.
 
Can anyone offer any advice on the above issues?
 
Thank you
AnswerRe: Files size and formattingmemberNil_Gup24-Apr-07 7:21 
Hi,
Please check the description point wise.
1. It should not increase the size.In fact the idea behind .rtf file is to reduce the size.
Open the file and in save as select .rtf file type document. It shpuld reduce the size.
2. If you want to save the formating in database then you can write the whole .rtf file. I havent tried but it should work. You can have a debug before the file writing code and see how it gets your fonts . it will have a long string say like verdana\10pt and something like that.
3. If you are opening more than one instance then it may happen. In your task manager check for word file instances.This may occour because of the same
 
Please do get back if you are facing more issues.
 

 
Nilesh J. Gupte

GeneralDid a rewrite to C#/ASP.NETmemberC#_Pimpin24-Mar-07 11:26 
!th great article yust what i needed. But i needed it it C#/.NET 2.0 so i did a dirty rewrite that replaces a word String "##Gebruiker##" with "blaat". Have fun with it.
 
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text.RegularExpressions;
 
public partial class testpage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
 
}
 
protected void Button1_Click(object sender, EventArgs e)
{
 
String strvalue, Srefno;
Object td;
 
td = Server.CreateObject("Scripting.FileSystemObject");
System.IO.File.Copy(Server.MapPath("Template.rtf"), Server.MapPath("file2.rtf"));
 
String strFilePath = Page.Server.MapPath("file2.rtf");
 
//Open file2.rtf in read mode.
 
FileStream fs2 = new FileStream(strFilePath, FileMode.Open, FileAccess.Read);
 
//Declare d as a stream Reader
 
StreamReader d = new StreamReader(fs2);
 
d.BaseStream.Seek(0, SeekOrigin.Begin);
 
String swrtarget = d.ReadToEnd(); //Read the file from Start to End in one go.
 
d.Close(); // Close the Stream Reader
 

//Set the path to open file2.rtf
 
strFilePath = Server.MapPath("file2.rtf");
 
//Open file file2.rtf in Read Write Mode
 
FileStream fs1 = new FileStream(strFilePath, FileMode.Open, FileAccess.ReadWrite);
 
StreamWriter s = new StreamWriter(fs1); //Declare a Stream Writer.
 
String str = Regex.Replace(swrtarget, "##GEBRUIKER##", "blaat");
 

 
// After replacing all the values write these values in the file2.rtf via the file write (s).
 
s.WriteLine(str);
 
//After writing the data in the stream writer the values must be flushed.
 
s.Flush();
 
//Close the stream writer.
 
s.Close();
 
fs1.Close();
 
fs2.Close();
 

 

 

}
}

QuestionSimilar Requiremntmembernkmanglam16-Feb-07 3:50 
hello Nilesh,
 
I have similar requirements for my project. Please contact me on my mail id niraj at birkdaleclinic.co.uk
 
Niraj Manglam
Niraj@birkdaleclinic.co.uk
Questionit is very good article, but "##refno##", "##Title##" not workingmembersimonkang27-Nov-06 4:33 
I've create a word template .rtf with mergefield <<refno>> and <<Title>>, I can successful generate the .doc with correct format by using the method in this article. but the statement
str = replace(str, "##refno##", "your_real_string") never recongnized and found "##refno##", or "##Title##". I've also tried
str = replace(str, "MERGEFIELD refno \* MERGEFORMAT", "your_real_string") without luck
"MERGEFIELD refno \* MERGEFORMAT" is the string displayed when you click "toggle field codes" on the specific <<refno>> merge field.
 
could you help me how to let ##refno## or ##Title## to be recognized?
 

Thanks a lot
AnswerRe: it is very good article, but "##refno##", "##Title##" not workingmemberNil_Gup27-Nov-06 4:42 
Hi,
Check the doc in the notepad editor.
 
Try to find ##refno## and ##Title##... by using ctrl +F.
 
You may nit get it...
 
Then try to fing #refno#...
there will be somemistake like this...
It may happen because of a blank space
Check it delete the space and it will work fine...
 
Regards,
Nilesh
 
Nilesh J. Gupte

GeneralArticle OK but Formatting is not goodmembercykophysh3913-Nov-06 1:13 
Hi,
I had a quick look at your article and the content was ok, but unfortunately your formatting of the article is not so good. It kind of makes reading your article a bit of hard work.
Try using the <pre> tags to put your code in.
The guys on here are kind of really picky on the formatting of the tutorials which may be why the voting of your article is not so good.
 
thats just my 2c
 
Keep it up,

 


"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill


My Website || My Blog

GeneralProblem with Encodingmemberabiradib1-Jun-06 2:34 
I have Arabic characters in my database, which are not displayed correctly.
Cry | :(( help
GeneralRe: Problem with Encodingmemberrealnaimi26-Aug-06 21:01 
I have same as your problem I tried to search but I didn't succeed
Please inform me if reach a solusion
 
And I'll try to search more
GeneralRe: Problem with Encodingmemberchenccc9-May-09 22:31 
i have Chinese data it dispaly wrong

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130619.1 | Last Updated 23 May 2006
Article Copyright 2006 by Nil_Gup
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid