I have a checkboxlist.When I check one the value will appear in a table.Now I want that value and each value I check to make it a link.This is my code for getting the checked values:
foreach (ListItem item in check.Items)
{
if (item.Selected)
{
TableRow row = new TableRow();
TableCell celula = new TableCell();
celula.Style.Add("width", "200px");
celula.Style.Add("background-color", "red");
//celula.RowSpan = 2;
celula.Text = item.Value.ToString();
row.Cells.Add(celula);
this.tabel.Rows.Add(row);
Now I want the item.value to make it a link..I’m using c# in asp.net application
Add a
Hyperlinkcontrol to thecelula.Controlscollection instead of setting the TableCell’sTextproperty.Note that you need to recreate this table on every postback, so you might want to add this to
Page_PreRenderinstead.