Calling a javascript function on asp:button's click event

  • Thread starter Thread starter Praveen Ladwani
  • Start date Start date
P

Praveen Ladwani

I have written a click event for asp:button and I want to
call a javascript function named setMethod() which I have
wrtten seperately. Please tell me how to do this.
 
Hi Praveen,

A sample of a mailmessage with a button click

\\\
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Me.Button1.Text = "Send Mail"
Me.Button1.Attributes("onClick") =
"window.location='mailto:[email protected]?subject=Cor demo&body=I hope this
helps?';"
End If
End Sub
///
I hope this helps?
 
Back
Top