Solved

Dynamically copy and create html table

Posted on 2010-11-21
5
768 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

630 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