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!

the button for submit is not working, why?

Status
Not open for further replies.

neomax

Programmer
Jul 1, 2006
29
BG
Hi:)

I make a code for button "Submit" like this ( to submit checked radiobuttons). But it's not working and alert error message.

Code for button:

<asp:button id="Button4"

text="Submit"

OnClick="SubmitBtn_Click"

usesubmitbehavior="false"

runat="server"/><br />

error message:

Compiler Error Message: BC30456: 'SubmitBtn_Click' is not a member of 'ASP.default_aspx'.

Line 77: <asp:button id="Button4"
Line 78: text="Submit"
Line 79: OnClick="SubmitBtn_Click"
Line: 77
Please, help me to resolve it!

 
I'd either:

delete the OnClick="SubmitBtn_Click" code and double-click on the button in Visula Studio to create the event handler.

Or if you've created an event handler - select the button and right click to view it's properties, then in the properties window click on the icon that looks like a lightning bolt - this will show the OnClick event handler and you can use it to select an event handler or double click on it to create an event handler.

Hope this helps.
 
Hi mit99mh!
Thanks a lot for help, I've change OnClick to OnClientClick, it helps:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top