Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

event handler not handling

Status
Not open for further replies.

TruthInSatire

Programmer
Aug 12, 2002
2,964
US
A little new to asp.net.

I'm using VB.net

I have a form with a button that doesn't seem to trigger the handler. any help would be great.

Code:
Sub Button1_Click(sender As Object, e As EventArgs)
...
...
End Sub

...
...

<asp:button id="Button1" runat="server" Font-Bold="True" ForeColor="White" BackColor="#000040" Text="Add Employee" width="280px"></asp:button>

The handler is supposed to insert the record. Got no errors, no insert either. Put some bogus code in the function to at least get an error but never got the error so i assume the handler isn't being triggered.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
You'l either need to add a "Handles Button1.Click" statement onto the end of your sub (if you are using a code behind file or you'll need to tell the button's onClick event which function to use).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
just onClick = "Button1_Click"?

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Yes...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
thanks. I'm actually helping a long distance co-worker who is even less familure than i am.

I had suggested that, and I thought it had been done and it still didn't work. Come to find out what i had suggested was missunderstood. they put the onclick=... in the sub somewhere.

Thanks for the help. the handler is handling again.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top