By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

What am i doing wrong in calling this script? Urgent please. Thank You.

P: n/a
Hi,

I just uploaded a web site and i am getting an error.

I have a script which sends form values to an email using AspNetEmail.
The script was working when i was calling the script like this:
<asp:Button ID="Finish" runat="server" OnClick="sendEmail">

However, in this new web site version, when the button is pressed, to scripts are supose to run.
So i replaced the button code with this:
<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:
Sub btnFinish_Click( s As Object, e As EventArgs )
InsertFormValues.DoInit()
sendEmail()
End Sub

I get the following error:

"BC30455: Argument not specified for parameter 'e' of 'Private Sub sendEmail(sender As Object, e As System.EventArgs)'."

in this line:

Line 136: sendEmail()

So i am calling the script in the wrong way.
I also tryied to call it just with "sendEmail".

The script starts with:
Private Sub sendEmail(sender as Object, e as System.EventArgs)
...

I really need to have this done tonight. Can you help me?

Thank You,
Miguel

P.S: Working with ASP.NET / VB


Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Have you tried adding : handles Finish.Click to the end of your function
definition?

<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:

Sub btnFinish_Click( s As Object, e As EventArgs ) handles Finish.click
InsertFormValues.DoInit()
sendEmail()
End Sub

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Hi,

I just uploaded a web site and i am getting an error.

I have a script which sends form values to an email using AspNetEmail.
The script was working when i was calling the script like this:
<asp:Button ID="Finish" runat="server" OnClick="sendEmail">

However, in this new web site version, when the button is pressed, to
scripts are supose to run.
So i replaced the button code with this:
<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:
Sub btnFinish_Click( s As Object, e As EventArgs )
InsertFormValues.DoInit()
sendEmail()
End Sub

I get the following error:

"BC30455: Argument not specified for parameter 'e' of 'Private Sub
sendEmail(sender As Object, e As System.EventArgs)'."

in this line:

Line 136: sendEmail()

So i am calling the script in the wrong way.
I also tryied to call it just with "sendEmail".

The script starts with:
Private Sub sendEmail(sender as Object, e as System.EventArgs)
...

I really need to have this done tonight. Can you help me?

Thank You,
Miguel

P.S: Working with ASP.NET / VB



Nov 18 '05 #2

P: n/a
I added what you told me and now i got this error:
BC30506: Handles clause requires a WithEvents variable.

What should i do?

Thanks,
Miguel

"Ryan Ternier" <rt******@icompasstech.com.spamproof> wrote in message
news:O0**************@tk2msftngp13.phx.gbl...
Have you tried adding : handles Finish.Click to the end of your function
definition?

<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:

Sub btnFinish_Click( s As Object, e As EventArgs ) handles Finish.click
InsertFormValues.DoInit()
sendEmail()
End Sub

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Hi,

I just uploaded a web site and i am getting an error.

I have a script which sends form values to an email using AspNetEmail.
The script was working when i was calling the script like this:
<asp:Button ID="Finish" runat="server" OnClick="sendEmail">

However, in this new web site version, when the button is pressed, to
scripts are supose to run.
So i replaced the button code with this:
<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:
Sub btnFinish_Click( s As Object, e As EventArgs )
InsertFormValues.DoInit()
sendEmail()
End Sub

I get the following error:

"BC30455: Argument not specified for parameter 'e' of 'Private Sub
sendEmail(sender As Object, e As System.EventArgs)'."

in this line:

Line 136: sendEmail()

So i am calling the script in the wrong way.
I also tryied to call it just with "sendEmail".

The script starts with:
Private Sub sendEmail(sender as Object, e as System.EventArgs)
...

I really need to have this done tonight. Can you help me?

Thank You,
Miguel

P.S: Working with ASP.NET / VB


Nov 18 '05 #3

P: n/a
Miguel Dias Moura wrote:
Hi,

I just uploaded a web site and i am getting an error.

I have a script which sends form values to an email using AspNetEmail.
The script was working when i was calling the script like this:
<asp:Button ID="Finish" runat="server" OnClick="sendEmail">

However, in this new web site version, when the button is pressed, to
scripts are supose to run.
So i replaced the button code with this:
<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:
Sub btnFinish_Click( s As Object, e As EventArgs )
InsertFormValues.DoInit()
sendEmail()
End Sub

I get the following error:

"BC30455: Argument not specified for parameter 'e' of 'Private Sub
sendEmail(sender As Object, e As System.EventArgs)'."
in this line:

Line 136: sendEmail()

So i am calling the script in the wrong way.
I also tryied to call it just with "sendEmail".

The script starts with:
Private Sub sendEmail(sender as Object, e as System.EventArgs)
...

I really need to have this done tonight. Can you help me?

Thank You,
Miguel

P.S: Working with ASP.NET / VB

It appears that your sendEmail is expecting the sender and e arguments.
Depending upon your sendEmail sub/function you may not need these
arguments or you can pass them to the sendEmail function as such
sendEmail(s,e), I think haven't tested but hopefully you get the idea.

Marty U.
Nov 18 '05 #4

P: n/a
Thanks,

i just solved it with your sugestion.

Thanks Once Again,
Miguel

"Marty U." <no**@none.com> wrote in message
news:_Y2Cc.161510$Ly.160354@attbi_s01...
Miguel Dias Moura wrote:
Hi,

I just uploaded a web site and i am getting an error.

I have a script which sends form values to an email using AspNetEmail.
The script was working when i was calling the script like this:
<asp:Button ID="Finish" runat="server" OnClick="sendEmail">

However, in this new web site version, when the button is pressed, to
scripts are supose to run.
So i replaced the button code with this:
<asp:Button ID="Finish" runat="server" OnClick="btnFinish_Click"

btnFinish_Click is as follows:
Sub btnFinish_Click( s As Object, e As EventArgs )
InsertFormValues.DoInit()
sendEmail()
End Sub

I get the following error:

"BC30455: Argument not specified for parameter 'e' of 'Private Sub
sendEmail(sender As Object, e As System.EventArgs)'."
in this line:

Line 136: sendEmail()

So i am calling the script in the wrong way.
I also tryied to call it just with "sendEmail".

The script starts with:
Private Sub sendEmail(sender as Object, e as System.EventArgs)
...

I really need to have this done tonight. Can you help me?

Thank You,
Miguel

P.S: Working with ASP.NET / VB

It appears that your sendEmail is expecting the sender and e arguments.
Depending upon your sendEmail sub/function you may not need these
arguments or you can pass them to the sendEmail function as such
sendEmail(s,e), I think haven't tested but hopefully you get the idea.

Marty U.

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.