Need Help Creating Web Pages Dynamically

K

Kristen

I am using ASP.Net 2.0 and I need to create a web page on the fly based
on what information is in the database. The page is going to have
certain controls like text boxes and labels and buttons. I was
wondering what the best method is to carry this out. I was thinking
about using a class to generate the HTML on the fly or maybe a stored
procedure. Can anyone point me in the right direction? Thanks
 
M

Mark Rae

I am using ASP.Net 2.0 and I need to create a web page on the fly based
on what information is in the database. The page is going to have
certain controls like text boxes and labels and buttons. I was
wondering what the best method is to carry this out. I was thinking
about using a class to generate the HTML on the fly or maybe a stored
procedure. Can anyone point me in the right direction? Thanks

Creating web pages on the fly is precisely what ASP.NET does - ASP = Active
Server Pages...

I suggest you get yourself a beginner's guide to ASP.NET, and read it twice.
This would be a good one:

http://www.amazon.com/gp/product/04...548188/ref=sr_1_3/103-6169839-4509436?ie=UTF8
 
K

Kristen

You don't understand what I am asking. I am not going to be building
the page at design I need to generate the controls and the page based
on what is in the database at runtime. In one case part of the page
will be built at design time and the rest is optional and may or may
not appear based on a certain database field.
 
M

Mark Rae

You don't understand what I am asking. I am not going to be building
the page at design I need to generate the controls and the page based
on what is in the database at runtime. In one case part of the page
will be built at design time and the rest is optional and may or may
not appear based on a certain database field.

Clickon and I understand perfectly what you are asking - what *you* need to
do is to get yourself a beginner's guide to ASP.NET (as we have both
suggested) and read it.

It is a perfectly simple thing to create controls dynamically at runtime in
response to database queries or whatever - the Page object is simply a
container for other controls, and how those controls are added to it are of
supreme irrelevance to it.

The design view of an aspx page is nothing more than a tool to aid
developers to build web pages in a more human-understandable way i.e.
graphically - you don't have to use it if you don't want to. You could even
build the entire page in code at runtime if you like, though that would
probably by symptomatic of a lack of proper planning and design.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top