0

I have this code in Gridview:

<asp:HyperLinkField  DataNavigateUrlFields="data" 
                     DataNavigateUrlFormatString="SMSReport.aspx?data={0}&amp;db=1"
                     HeaderText="Ataskaita"
                     Text="Ataskaita" />

and I need to add on-click handler(like message do you want to continue?). I tried to google, but what i found is that you can't add handler in 'HyperLinkField'. Any ideas how to add on-click effect?

Mitat Koyuncu
  • 928
  • 8
  • 20
Macb3th
  • 101
  • 2
  • 5
  • 17

1 Answers1

1

I would lose the hyperlink it put in a button. It would solve the onclick handler problem and give you some more flexibility.

  • Here is the MSDN article to add yes/no message boxes
  • Here is another stackoverflow article walking you through it (it's at the bottom)
  • Here is an article on how to add a button to the gridview
Community
  • 1
  • 1
Nefariis
  • 3,451
  • 10
  • 34
  • 52