I am working on ASP.Net 1.1.
In a page I have table as :
<table id="dlInterior" Width="300" Runat="server" CellSpacing="0" CellPadding="0">
<tr>
<td id="inttd" vAlign="top" width="350" runat="server"></td>
</tr>
</table>
On Page load - I am adding rows to this table dynamically as :
public static void DisplayDecodedInfo(object[] decodedValues, HtmlTable tableToAdd)
{
try
{
if(decodedValues.Length > 0)
{
foreach(string item in decodedValues)
{
HtmlTableCell tdInterior = new HtmlTableCell();
HtmlTableCell tdInterior1 = new HtmlTableCell();
tdInterior1.Attributes.Add("Width","3%");
tdInterior1.Attributes.Add("Align","Center");
HtmlTableRow trInterior = new HtmlTableRow();
trInterior.Attributes.Add("Height","20px");
tdInterior.Attributes.Add("padding-left","2cm");
tdInterior.InnerHtml = "<b>*</b> " + item;
trInterior.Controls.Add(tdInterior1);
trInterior.Controls.Add(tdInterior);
tableToAdd.Controls.Add(trInterior);
}
}
}
}
Now On SAVE button click event of the page, I need to fetch these string values row by row .
Please suggest how is it possible.
Well you cannot just fetch the content of a HTML table from a server side script. So what should you do is also render hidden fields for data and on submit you can find it in
Request.Form[]
.