Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic page Creation ASP and C#

Reply
Thread Tools

Dynamic page Creation ASP and C#

 
 
Tex
Guest
Posts: n/a
 
      02-09-2006
I am trying to build a survey application using asp.net 2.0 and c# in
visual studio 2005. I am fairly new to asp. I need to find a way to
dynamically create a page with all of the survey questions on it. I am
able to gather question names, types, answers etc... However once I
have all of this information I am not sure how to dynamically create
this webpage with different kinds of questions with varying amounts of
answers.

Any help would be appreciated.

Thanks

 
Reply With Quote
 
 
 
 
Spam Catcher
Guest
Posts: n/a
 
      02-09-2006
"Tex" <> wrote in news:1139459232.024245.115520
@f14g2000cwb.googlegroups.com:

> I am trying to build a survey application using asp.net 2.0 and c# in
> visual studio 2005. I am fairly new to asp. I need to find a way to
> dynamically create a page with all of the survey questions on it. I am
> able to gather question names, types, answers etc... However once I
> have all of this information I am not sure how to dynamically create
> this webpage with different kinds of questions with varying amounts of
> answers.



I think you need some basic ASP.NET tutorials:

http://aspnet.4guysfromrolla.com/articles/081402-1.aspx

Basically you need to create the controls dynamically - based on the
contents of your survey.


--
Stan Kee ()

Boycott StarForce!
http://www.glop.org/starforce
 
Reply With Quote
 
 
 
 
Tex
Guest
Posts: n/a
 
      02-09-2006
I can add controls dynamically, but since I dont know how many I may
need to add how can I specify a place holder for each. If I don't give
a place holder it just crams verything up next to eachother. I guess I
see how to create the controls but how can I control the layout when I
don't know how many controls I may be adding?


Thanks

 
Reply With Quote
 
KMA
Guest
Posts: n/a
 
      02-09-2006
To space out the controls, put a break in between each (<BR>), for example,
or add CSS info. A key issue is how you handle the postback. You may need to
assign a unique ID to each set of controls so that you can iterate through
them and find out what question they were ansering.

"Tex" <> wrote in message
news: ups.com...
>I can add controls dynamically, but since I dont know how many I may
> need to add how can I specify a place holder for each. If I don't give
> a place holder it just crams verything up next to eachother. I guess I
> see how to create the controls but how can I control the layout when I
> don't know how many controls I may be adding?
>
>
> Thanks
>



 
Reply With Quote
 
Spam Catcher
Guest
Posts: n/a
 
      02-09-2006
"Tex" <> wrote in news:1139464318.723409.86400
@f14g2000cwb.googlegroups.com:

> If I don't give
> a place holder it just crams verything up next to eachother. I guess I
> see how to create the controls but how can I control the layout when I
> don't know how many controls I may be adding?


You can stuff multiple controls into a place holder.

Or you can do dynamic formatting - i.e. build your table dynamically.

Or you can use a control like a DataGrid, Repeater, or DataList.

--
Stan Kee ()

Boycott StarForce!
http://www.glop.org/starforce
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net dynamic creation problem. mausimo ASP .Net 0 09-24-2009 04:23 PM
creation of a set of dynamic hyperlink controls into a page Carlos ASP .Net 1 11-10-2006 01:57 PM
How to (batch) set EXIF date taken and IPTC creation date and creation time for photos with filenames YYMMDDHHMMSS#.jpg? guercheLE@gmail.com Digital Photography 1 10-04-2005 07:15 PM
Dynamic Control Creation and ViewState: what is the ASP.Net way? PABruceFan ASP .Net Web Controls 3 07-31-2004 06:43 PM
Dynamic Control Creation and ViewState: what is the ASP.Net way? PABruceFan ASP .Net 3 07-31-2004 06:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57