By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

How to add dynamic block of textboxes.

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.