Newbie - Dynamic Controls

L

Laura K

I am building a webpage that pulls what would have been an include file in
ASP 3. Basically it is an HTML navigation bar. Instead of using an inc file
I am trying to use controls as I have read that this is the proper way to
handle former includes. Here is my problem:

Problem 1

There are about ten nav bars which can be called to page two depending on a
choice the user makes on page one. Each nav bar is one control. I see two
ways to handle this. I welcome suggestions for more.

1. An if statement which reads the link that the user has clicked on page 1
and then calls the appropriate control on page two. Not sure where to place
this if statement. It would be reused on several pages.

2. Putting the control information in the database to be called up when the
user clicks the link. The link on page one sends an ID to page two and I
can place the control info into the database in a field in each row. Then I
can dynamically write the code to the page to display the navbar control.

Or another option?

Problem 2

Because there are 10 controls total that can possibly be on page two this
means that I have to register all 10 tags. I understand that I can create
composite controls. Is this appropriate in this case? Is there a way to
register them all in one file (sort of like a master control file) and then
register that one file on each page that contains the navbars?

Obviously I am a complete newbie at controls. I have looked at tons of
tutorials and still am having problems making heads or tails of this. Any
help would be much appreciated.

Thanks
Laura K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top