Hi,
I am using asp.net, C# and sql server
I have a gridview control which looks like the following
DataNavigateUrlFormatString="http://www.anrdoezrs.net/click-1850716-10387413?sid={0}"/> In the DataNavigateUrlFormatString="http://www.anrdoezrs.net/click-1850716-10387413?sid={0} i want to replace the {0} with the logged in user's identity which is Page.User.Identity.Name. How should i do it should i do it in the DataNavigateUrlFields property or in the code behind pages. I tried creating a method in the code behind file as follows to get the identity and displaying it public string GetMemberID() and tried calling it in the datagrid hyperlink column as follows How should i go about it. Please help. Thanx in advance.
{
return Page.User.Identity.Name.ToString();
}
but got an error message as follows :
Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.HyperLinkField does not have a DataBinding event.
La'Chelle LuppnowPosted Feb 17, 2020, 11:39 PM