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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top