I'm creating some textboxes and labels dynamically and am trying to hide/show them via JQuery but can't get the JQuery working. What am I doing wrong?
Here's the code behind:
TableCell td4 = new TableCell();
Label l2 = new Label();
l2.ID = "lbSell" + dp.dSellAutoID.ToString();
l2.Text = Math.Round(Convert.ToDecimal(dp.dSellPrice), 2).ToString();
l2.Visible = false;
td4.Controls.Add(l2);
TextBox tb1 = new TextBox();
tb1.ID = "tbSell" + dp.dSellAutoID.ToString();
tb1.Width = 50;
tb1.Text = Math.Round(Convert.ToDecimal(dp.dSellPrice), 2).ToString();
td4.Controls.Add(tb1);
tr.Cells.Add(td4);
And here's the JS:
function editRow(rowID) {
//alert(rowID);
$('#' + 'lbSell' + rowID).show();
$('#' + 'tbSell' + rowID).hide();
}