<p>Is there a best practice when it comes to setting client side "onclick" events when using ASP.Net controls?  Simply adding the onclick attribute results in a Visual Studio warning that onclick is not a valid attribute of that control.  Adding it during the Page_Load event through codebehind works, but is less clear than I'd like.</p>

<p>Are these the only two choices?  Is there a right way to do this that I'm missing?</p>

<p>Thanks!
Eric Sipple</p>

Setting the value for
```
WebControl.Attributes["onclick"]
```
is okay. If ASP.NET needs a client-side
```
click
```
handler, it will concatenate the values, delimited by semi-colon.