Quick Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a document that i'm reading from a flat text file and printing to an
HTML page. I am wanting to search the document that I am writing to the page
and replace say every instance of the with a text box. When the user submits
the document I need to perform validation on each text box to make sure data
was entered. Do you know of an easy way to do this?

Many thanks in advance!
Ryan
 
I have a document that i'm reading from a flat text file and printing
to an HTML page. I am wanting to search the document that I am
writing to the page and replace say every instance of the with a text
box. When the user submits the document I need to perform validation
on each text box to make sure data was entered. Do you know of an
easy way to do this?


Regular Expressions?

Manual Parsing?

How is the data formatted?
 
The text will be a regular document. I will want to replace each instance of
the following code which will let me know where I need to enter a text box
("[textbox]"). This will be normal document such as a contract or letter. I
will need to scan the document and replace all instances of [textbox] which
is not hard but the hard part or the part I can't figure out is how to
replace it with a server side object and tie it to a validation routine.

Ryan
 
The text will be a regular document. I will want to replace each
instance of the following code which will let me know where I need to
enter a text box ("[textbox]"). This will be normal document such as
a contract or letter. I will need to scan the document and replace
all instances of [textbox] which is not hard but the hard part or the
part I can't figure out is how to replace it with a server side object
and tie it to a validation routine.


Definately use regular expressions... they're fast and flexible.

Also consider this - you might want to do the replacement at runtime,
that'll give you the ability to edit the text templates before rendering.
Might be useful if these forms change a lot (or if they want to tweak
something in the form).
 
Back
Top