Results 1 to 2 of 2

Thread: asp:hyperlinkcolumn

  1. #1
    Join Date
    Dec 1969

    Default asp:hyperlinkcolumn

    How can I specify that the link in my hyperlinkcolumn should have no underline?

  2. #2
    Join Date
    Dec 1969

    Default RE: asp:hyperlinkcolumn

    Here&#039;s one way.<BR>I&#039;ll assume your hyperlink is in a datagrid and it&#039;s the first column of the datagrid and that the id for the datagrid is "searchResults".<BR><BR>In your code behind you&#039;ll have an "ItemDataBound" event for your control. This is the time that in this case the datagrid is being populated.<BR><BR>Private Sub searchResults_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles SearchResults.ItemDataBound<BR> Dim itemType As ListItemType = e.Item.ItemType<BR> If ((itemType = ListItemType.Pager) Or (itemType = ListItemType.Header) Or (itemType = ListItemType.Footer)) Then<BR> Return<BR> Else<BR> e.Item.Cells(0).Style.Item("textDecoration") = "none"<BR> End If<BR>End Sub<BR><BR>If you don&#039;t have a datagrid in your case I&#039;m sure you&#039;ll be able to adapt this code to fit your needs.<BR><BR>hth<BR><BR>matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts