473,473 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding Controls on the Fly...

Hi All,

I guess one piece I am missing about ASP.NET is how to add
controls on the fly.

For example: I am trying to get data from a database and
then for each record add a Checkbox to the webform.

How can this be done within the *.aspx.vb form?

I would have simply done this in ASP:

<form>
<%
while not rs.eof

Reponse.Write <Checkbox Stuff>
rs.movenext
wend
%>
</form>

so how do I do it? I don't put the <form> tags in the vb
page...I want to add it as a server control on the fly...

What am I missing here? Thanks for any help.

Jul 19 '05 #1
2 2620
Objects, such as the Page or Panel object, have a Controls collection. You
can dynamically create controls, then add them to this collection using the
Add method.

--
James J. Foster, DotNetCoders
http://www.dotnetcoders.com
"Phil Lamey" <ph********@snb.ca> wrote in message
news:0c****************************@phx.gbl...
Hi All,

I guess one piece I am missing about ASP.NET is how to add
controls on the fly.

For example: I am trying to get data from a database and
then for each record add a Checkbox to the webform.

How can this be done within the *.aspx.vb form?

I would have simply done this in ASP:

<form>
<%
while not rs.eof

Reponse.Write <Checkbox Stuff>
rs.movenext
wend
%>
</form>

so how do I do it? I don't put the <form> tags in the vb
page...I want to add it as a server control on the fly...

What am I missing here? Thanks for any help.


Nov 12 '05 #2
Any suggestions on what control to use when I want to list a number of
selectable offices (can be multiple) or all offices.

Thanks,

Phil Lamey

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: avivgur | last post by:
Hello, I am writing a program in Visual C# and I have encountered a problem. In my program I want to dynamically create a multitude of controls (thousands) on a form. The problem is that calling...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
0
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
3
by: edurazee | last post by:
I am from C# Winforms background and recently switched to ASP.NET in c#. After working with Winforms applications along with BusinessObjects, O/R Mapping frameworks, and logical layering...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.