Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: ASP.Net button to also fire javascript as well?


Message #1 by Julian Voelcker <asp@t...> on Tue, 04 Feb 2003 14:56:22 GMT
Yup

-----Original Message-----
From: Julian Voelcker [mailto:asp@t...]
Sent: 4. februar 2003 16:19
To: ASPX_Professional
Subject: [aspx_professional] Re: ASP.Net button to also fire javascript
as well?


Thanks Einar,

I assume I just add this to the Page_Load event to make sure that it
'takes'.

On Tue, 4 Feb 2003 16:01:17 +0100, Einar Paul Qvale wrote:
> Button.Attributes.Add("onclick", "SomeClientFunction()");
>
> Will fire the script first, then submit and do the server code.
>
> If you want to cancel the submit you can set event.returnValue=3Dfalse 

> (IE
> only)
>


Cheers,

Julian Voelcker
The Virtual World (UK) Limited
Cirencester, United Kingdom




  Return to Index