Im trying to set navigation url to a hyperlink which is inside a gridview.
Im creating the table inside the gridview using a literal in backend c# code.
The code now look like inside GridviewRowDataBound(object sender, GridViewRowEventArgs e)
Literal.Text += "<asp:HyperLink ID='hlContact' runat='server' NavigateUrl='#'>Contact </asp:HyperLink>";
I want to set the navidation inside this code
If anyone have an idea it will be helpful
Thanks
When we writing
htmlcontent to theliteral, it won’t picking up theasp hyperlinkcorrectly. But when I used the normal“a”tag, it taking the redirection path correctly.