468,107 Members | 1,375 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Need Help Creating Web Pages Dynamically

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

Aug 14 '06 #1
5 1154
That's what ASP.net does, you use controls, bind them to data and it
generates the correct HTML. You need to go buy a decent asp.net book and
learn how to use it, a asp.net getting started tutorial is a bit beyond the
scope fo these forums.

I sugest this book
http://www.wrox.com/WileyCDA/WroxTit...470042583.html

"Kristen" wrote:
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

Aug 14 '06 #2
"Kristen" <cg********@hotmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
>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/047...509436?ie=UTF8
Aug 14 '06 #3

clickon wrote:
That's what ASP.net does, you use controls, bind them to data and it
generates the correct HTML. You need to go buy a decent asp.net book and
learn how to use it, a asp.net getting started tutorial is a bit beyond the
scope fo these forums.

I sugest this book
http://www.wrox.com/WileyCDA/WroxTit...470042583.html

"Kristen" wrote:
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
Aug 14 '06 #4
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 wrote:
That's what ASP.net does, you use controls, bind them to data and it
generates the correct HTML. You need to go buy a decent asp.net book and
learn how to use it, a asp.net getting started tutorial is a bit beyond the
scope fo these forums.

I sugest this book
http://www.wrox.com/WileyCDA/WroxTit...470042583.html

"Kristen" wrote:
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
Aug 14 '06 #5
"Kristen" <cg********@hotmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
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.
Aug 14 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by LIN | last post: by
7 posts views Thread by nicholas | last post: by
6 posts views Thread by Gary Kahrau | last post: by
3 posts views Thread by Mike Dee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.