That would be tough because the elements are objects, and do not all have
the same properties (a TextBox does not have the same properties as a Label,
for example). If you REALLY wanted to do that (I don't know why you would,
if you know exactly what the HTML will be use a *.html file), create a
database table with 3 fields:
First Field (the primary key): an integer specifying the order of the tags
Second Field: a string that lists the tag (such as input, font, table, etc.)
and attributes or literal content
Third Field: a string that specifies whether the second field is an opening
tag, closing tag, or literal content
The second field would need to be parsed, since it must be all one string
and you cannot have separate fields for the properties since different tags
have different properties. When the third field has a value of 'closingtag'
you can either give the second field an empty string and dynamically
determine what tag it is closing or just give the second field a value of
what the closing tag would look like (</table>, </font>, etc.). However, I
still think that doing this is more work than necessary and that you should
find a better way, if you let us know your reason for wanting to put this
info in a database instead of one of the conventional methods we might be
able to help you find a better and easier way to achieve your goal.
--
Nathan Sokalski
nj********@hotmail.com http://www.nathansokalski.com/
"Ganesh Muthuvelu" <Ga*************@discussions.microsoft.com> wrote in
message news:52**********************************@microsof t.com...
Hello,
I was wondering if there is a way to store all the HTML element
information
in a database and then dynamically generate the HTML code for a page?..
Basically, I do not want to design every HTML page, instead just define
the
elements like "label", "Textbox", "Submit" button etc., in a database and
then have a tool generate the HTML code forme..
Does anyone have any ideas or pointers??
Thanks.