Avatar of SM17CH
SM17CH
 asked on

Convert HTML table to aspx control

Hey,
Being new at asp.net I used Adobe Dreamweaver to build a table. I then copied the code across into Visual Studio 2008.

How can I easily make this able an asp control so I can do stuff to it such as dynamically add additional rows etc.?

Cheers
Mitch
<table width="768" border="0">
  <tr>
    <td width="81">Date</td>
    <td width="159" colspan="2">&nbsp;</td>
    <td width="95">&nbsp;</td>
    <td width="159" colspan="2">&nbsp;</td>
    <td width="89">&nbsp;</td>
    <td width="159">&nbsp;</td>
  </tr>
  <tr>
    <td>Start Time</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>End Time</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>Category</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Start Time</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>End Time</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>Category</td>
    <td>&nbsp;</td>
  </tr>
</table>

Open in new window

.NET ProgrammingASP.NETMicrosoft Development

Avatar of undefined
Last Comment
strider_1981

8/22/2022 - Mon
vora_bhaumik

ashraf882

step 1. Convert Html page into .aspx. for example you have index.html, open that with dreamweaver and save as index.aspx.

step 2. open ASP.NET web site. put that file into that folder.

step 3. After putting this, right click folder, you will sub menu that menu choose Add New Item. After that the new dialog box will be opend. then choose class file. if you use C#, change that name as index.aspx.cs and finally press OK.

step 4. In that class file, change the following

public partial class _index : System.Web.UI.age
{

}

step 5. Now go to index.aspx, bottom of that page, there will be source, if your press that you will get html content

step 6. Write the following coding at top of that source

<%@ Page Language="C#" AutoEventWrireUp="true" CodeFile = "~/index.aspx.cs" Inherits="_index" %>

step 7. Finally save that file and close entire web application.

Step 8. Now you can open that web application

Step 9. After openning, press F5, the page will be executed.

Source: http://www.dotnetspider.com/forum/103000-Convert-HTML-into-aspx.aspx
vora_bhaumik

>> Lol, Same link posted.. that dotnetspider.....
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
SM17CH

ASKER
Im not sure if thats what Im after or not as I may have not explained properly.
I already have a asp.net project setup.
I have the HTML table built (code shown in orignal post).
I want to convert the table to an asp control so I can use the c# code to perform actions on it.
Dont ASP tables look something like...
<asp:Table ID="Table1" runat="server">
 
vora_bhaumik

means you need a user control ????
ASKER CERTIFIED SOLUTION
ashraf882

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
vora_bhaumik

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
vora_bhaumik

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
strider_1981

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.