I am fetching data from a sql query into an asp table in cs code behind page
TableCell tCell1 = new TableCell();
tCell1.Text = myDataRow["tid"].ToString();
I want to convert that id into a hyperlink. How can I do that?
You can create a HyperLink
control and add it as a child of the TableCell
:
HyperLink link = new HyperLink();
link.NavigateUrl = ...
link.Text = ...
TableCell tCell1 = new TableCell();
tCell1.Controls.Add(link);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With