|
Very important notice: 95% of html page is static information which never will be changed. Only 5% is dynamic data so we need the way to mark those places in our html page as a place where we can put our information. Apparently one of such places is input fields such as input boxes, radio buttons. That's why parser will create an objects for all of them. Also we must be able to have read only information on html page which comes from database. Because of it parser will understand construction <input type="static" ...>. Of course we always can use substitutor for that but it's not always good approach because it's not object oriented approach. Also sometimes we have dynamic tables on html page. With dynamic tables we do not know up front how many rows do we have or sometimes even do not know anything about tables. So parser will create an object HtmlTable for constructions <Table ...>. Such objects we call "control" and all of them resides in controls collection. You can retrieve control by name. Because of it all controls must have "name" property in template. Example: <input type="text" name="Age">. Without name it's not valid control. Here is all constructions which can be interpreted by html parser.
Please not that it's important to not have space between < and input ( or Table, select) also it's impotant to have it with small letters (except Table). It's gives you way to exclude some of them from controls collection. Example:
Also all properties must be set with double quotes or single. Example: <input type="text" ...> - valid. <input type=text ..> not valid. These rules are compatible with FrontPage ( FrontPage generates exactly the same html text ) except Table. It's done just because you probably have 10 tables on your html page and only one of them is dynamic tables. So you will need to change it manually to <Table ..>.
|