In my code i create a HyperLinkField object. Depending on a database field value, i want to set the NavigateUrl property. This is my problem, i don’t know how.
With:
objHF.DataNavigateUrlFields = new[] { 'id', 'Stype' };
i get my database field. Now i want to check the Stype value. Depeding on this value i want to set the page where to navigate to. How can i do this??
At the end i set my datasource to the gridview and after that i call the bind() method.
I hope someone can help me out
Make the HyperLinkField a TemplateField, and set the NavigateUrl of the resulting HyperLink (in markup) to something like
Next create a corresponding function in the .cs file: