This is my code behind in C# .
protected void Page_Load(object sender, EventArgs e)
{
Name = "Nitin";
}
I have a GridView in which there is a Hyperlinkfield.I want to send Name from C# page(one in code behind) to next page via HyperLinkField but it is not one of the BoundField's of the GridView(i.e. Which I get from EntityDataSource). This is my asp.net code.
code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="WorkItemsEntityDataSource">
<Columns>
<asp:hyperlinkfield datatextfield="Id"
datanavigateurlfields="Id"
datanavigateurlformatstring="~\WorkItems.aspx?Id={0}"
headertext="Id"/>
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="TFSId" HeaderText="TFSId" SortExpression="TFSId" />
<asp:CheckBoxField DataField="IsBillable" HeaderText="IsBillable" SortExpression="IsBillable" />
</Columns>
</asp:GridView>