473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

How to add dynamic block of textboxes.

Hi,

I have a group of textboxes ("firstname" and "lastname") and a 2 buttons
("remove this block" and "add a new block").

And onto the main form, I have button called "submit the form" and an
initial block without the "remove this block" button

My question is to know how can I add and remove dynamically this block ?
And of course, how to "catch" all the values of the different dynamic blocks

The best way for me would be to use the Ajax update panel.

Any idea ?

Stan

May 8 '07 #1
5 3104
Hi Stan,

Please have a look at following topics:

1.
http://msdn.microsoft.com/newsgroups...1-d2a1cefd6ea2

2.
http://msdn.microsoft.com/newsgroups...6-b4d300e1c3ff

hope this helps
--
Milosz
"Stan SR" wrote:
Hi,

I have a group of textboxes ("firstname" and "lastname") and a 2 buttons
("remove this block" and "add a new block").

And onto the main form, I have button called "submit the form" and an
initial block without the "remove this block" button

My question is to know how can I add and remove dynamically this block ?
And of course, how to "catch" all the values of the different dynamic blocks

The best way for me would be to use the Ajax update panel.

Any idea ?

Stan

May 9 '07 #2
I have a group of textboxes ("firstname" and "lastname") and a 2 buttons
("remove this block" and "add a new block").

And onto the main form, I have button called "submit the form" and an
initial block without the "remove this block" button
If the "content of the block" remains same, create a custom WebControl and
then use Repeater Control!
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 9 '07 #3

"MasterGaurav
>I have a group of textboxes ("firstname" and "lastname") and a 2 buttons
("remove this block" and "add a new block").

And onto the main form, I have button called "submit the form" and an
initial block without the "remove this block" button

If the "content of the block" remains same, create a custom WebControl and
then use Repeater Control!
Yes it has the same content.
But I don't know how to add and remove dynamically blocks.
Do you have any examples ?
Stan

May 9 '07 #4

"Milosz Skalecki [MCAD]"
>
Please have a look at following topics:

1.
http://msdn.microsoft.com/newsgroups...1-d2a1cefd6ea2

2.
http://msdn.microsoft.com/newsgroups...6-b4d300e1c3ff
Milosz,
I thank you for the url, it helps.
But as Gaurav said, do you think that it's possible to use a user
webcontrol and add and remove dynamically ?
Stan

May 9 '07 #5
Hi Stan,
Milosz,
I thank you for the url, it helps.
But as Gaurav said, do you think that it's possible to use a user
webcontrol and add and remove dynamically ?
Definitely yes.
That's how DataGrid, GridView, Repeater etc work! :)
They add Controls as and when needed.

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
May 27 '07 #6

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

Similar topics

7
by: Mark | last post by:
I want to create textboxes dynamically but with dynamic names also. i am retrieveing a load of values from a table in SQL into a DataReader. Then i want to create textboxes from those variables. ...
2
by: charliewest | last post by:
I need to create textboxes in real-time, the actual number of which is determine by a result from a database query. I have been able to create the controls, and then add them to the ASPX page....
4
by: Bhavin | last post by:
How can I capture user entered values from dynamically created controls in ASP.NET ? Thanks,
1
by: Kum | last post by:
Hi, I need help in asp.net dynamic textbox controls validation. I am creating textbox controls dynamically on a asp.net webpage. Now after creating the textboxes on the page I want to validate...
1
by: Elliot Rodriguez | last post by:
I have a dropdown list that defines the number of textboxes that appear within a particular panel. The boxes are created when the dropdownlist's SelectedIndexChanged event fires on postback. ...
4
Frinavale
by: Frinavale | last post by:
Introduction Sometimes, when developing web applications, we need to be able to dynamically load controls based on user selections. The following article describes a simple scenario where TextBox...
2
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation...
4
by: =?Utf-8?B?RHlsYW5TbWl0aA==?= | last post by:
I have a WebForm where I'm dynamically creating some controls and I'm having difficulty understanding how the state is being persisted and how to work with it. I've created a simplified example...
2
by: bharathi228 | last post by:
my code for retrieving values from database Dim da As New SqlDataAdapter("select parameter_name,parameter_units from sys_params", con) If con.State = ConnectionState.Closed Then con.Open()...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.