Is there a way to add an onclick event to an ASP.NET Label server control?

前端 未结 10 1045
不思量自难忘°
不思量自难忘° 2020-12-15 03:30

I wanted to do something like this:

My Label
10条回答
  •  鱼传尺愫
    2020-12-15 04:10

    I think you can, but it's a client-side onclick handler, not server side. It will complain about the attribute not being supported (or some such) but I think it renders correctly. If you want to to a server-side handler, I think you'll need to do a LinkButton.

提交回复
热议问题