Solved

Dynamically copy and create html table

Posted on 2010-11-21
5
767 Views
Last Modified: 2012-05-10
Hi

I have a small table within a CollapsiblePanelExtender.  It has two dropdowns and a few textboxes.

When a user clicks a button, I would like to copy this table and controls and then place the copy underneath the current table.

How would I do this?

Thanks
0
Comment
Question by:Sheritlw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:meispisces
ID: 34186794
Please explain in detail. What do you mean by "copy"?
0
 
LVL 11

Expert Comment

by:madgino
ID: 34188589
Beside copying the content the question is how would you use the new section as if you want to post the data the controls will have to have different id's for the dropdowns and comboboxes.

So I think the solution is not to 'copy' the content but to manually construct it using html code and new controls.
Here's an example on how to add controls to a panel:
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_22765581.html
0
 

Author Comment

by:Sheritlw
ID: 34190857

Since I have given up on the gridview and users will only add 1-4 records, I created a table with the fields I need and thought I would copy the format etc from the existing table and append a number ie. id = txtDescribe & "1"
I'm sure I can figure out how to recreate the table, but how do I place it below the other table?
The table is in a panel, so there should be a way to add the table below the one being copied.
Thanks
0
 
LVL 11

Accepted Solution

by:
madgino earned 500 total points
ID: 34200784
You should create an user control with your table and fields and dynamically add it to the page.
Here are some helpfull links:
http://www.codeproject.com/KB/user-controls/DynamicUC.aspx
http://www.4guysfromrolla.com/articles/092904-1.aspx
0
 

Author Closing Comment

by:Sheritlw
ID: 34202827
That is a good idea
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question