I have GridView with “HyperLinkField”, when I click on one of the several names in the table this lead me to another page. Then I want to show some information about the clicked item. Here in this code I describe that I want whatever row I have clicked, new page to be opened and to get FirstName clicked field from the previous page. I need some more information about this field in the code:
What exactly this field does ?
DataNavigateUrlFormatString="Page.aspx?FirstName={0}" />
and to be more specific this one: “FirstName={0}” />”
<asp:HyperLinkField
DataTextField="FirstName"
HeaderText="First Name"
DataNavigateUrlFields="FirstName"
DataNavigateUrlFormatString="Page.aspx?FirstName={0}" />
How to get this clicked field from the previous page in the new page ?
{0}is placeholder to replace the desired value. in above example datanavigateurlformatstring works with conjuction of datanavigateurlfields. it will replace DataNavigateUrlFields value. DataNavigateUrlFormatStringNote :
Use cases
to Uses This values in other page, you can access the
Requestproperty.