This HAS to be dead simple. But nearly two hours of googling hasn't found the answer.
I want to show a formview containing part of an employee's data. And I want to provide links to pages that display other parts of the data for the displayed record.
So the question is very simple:
How do I add the value of the EmployeeID field from the formview to the end of the hyperlink as a parameter?
Simple <%# Bind("EmployeeID") %> slotted into an HTML link didn't work.
<asp:HyperLink ID="HyperLink1" runat="server" >NavigateUrl="~/Level1/salary.aspx?EmpID="<%# Bind("EmployeeID") %>">Salary Details</asp:HyperLink>
Didn't work. (Bind not declared)
I tried binding a hidden field to the value and then referencing that, it didn't work.
<%# DataBinder.Eval(Container.DataItem,"filename").ToString()%> (Container not part of UI)
This must surely be something used all the time but I just cannot find the syntax to do it!
Everything else in the formview is working fine.
I want to show a formview containing part of an employee's data. And I want to provide links to pages that display other parts of the data for the displayed record.
So the question is very simple:
How do I add the value of the EmployeeID field from the formview to the end of the hyperlink as a parameter?
Simple <%# Bind("EmployeeID") %> slotted into an HTML link didn't work.
<asp:HyperLink ID="HyperLink1" runat="server" >NavigateUrl="~/Level1/salary.aspx?EmpID="<%# Bind("EmployeeID") %>">Salary Details</asp:HyperLink>
Didn't work. (Bind not declared)
I tried binding a hidden field to the value and then referencing that, it didn't work.
<%# DataBinder.Eval(Container.DataItem,"filename").ToString()%> (Container not part of UI)
This must surely be something used all the time but I just cannot find the syntax to do it!
Everything else in the formview is working fine.