Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dynamically copy and create html table

Posted on 2010-11-21
5
Medium Priority
?
770 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 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