R
Randall Parker
I want to generate an HTML tag that will look like:
<a href="EquipmentServiceCreate.aspx?serial=X01">Create New Service For X01</a>
or on a different instance where the user would be viewing "X05" it would looke like:
<a href="EquipmentServiceCreate.aspx?serial=X05">Create New Service For X05</a>
I'm trynig to figure out how to do that using HtmlGenericControl in C# code behind.
Can DataBinder.Eval work inside of plain HTML tags?
I'm trying to do something like this:
<a id="CreateServiceLink" runat="server"
href="'<%# "EquipmentServiceCreate.aspx?serial=" +
DataBinder.Eval(Container, "DataItem.owner_serial_num")
%>'x">Create New Service For</a>
But what is unclear to me is what I'd bind to the CreateServiceLink. A single DataRow?
But one can not do:
DataRow SingleRow = dsTheSingleItemDataSet.Tables[0].Rows[0];
CreateServiceLink.DataSource = SingleRow;
The HTMLGenericControl does not have DataSource as a property.
So can one not do this sort of thing with plain HTML?
<a href="EquipmentServiceCreate.aspx?serial=X01">Create New Service For X01</a>
or on a different instance where the user would be viewing "X05" it would looke like:
<a href="EquipmentServiceCreate.aspx?serial=X05">Create New Service For X05</a>
I'm trynig to figure out how to do that using HtmlGenericControl in C# code behind.
Can DataBinder.Eval work inside of plain HTML tags?
I'm trying to do something like this:
<a id="CreateServiceLink" runat="server"
href="'<%# "EquipmentServiceCreate.aspx?serial=" +
DataBinder.Eval(Container, "DataItem.owner_serial_num")
%>'x">Create New Service For</a>
But what is unclear to me is what I'd bind to the CreateServiceLink. A single DataRow?
But one can not do:
DataRow SingleRow = dsTheSingleItemDataSet.Tables[0].Rows[0];
CreateServiceLink.DataSource = SingleRow;
The HTMLGenericControl does not have DataSource as a property.
So can one not do this sort of thing with plain HTML?