Is there ASP button that won’t submit post form data.
Whenever I click an asp button it post form data and I want to change that behavior so I can post some other form data I will create it programmatically.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use JavaScript and intercept the
onclickevent, and there you make an Ajax call.In the event handler, return
falseand your form won’t be submitted. Something like this:On
your_asp_entry.aspxyou do whatever you need to invoke your C# function/method.Update: changed the answer after OP said on the comments he/she needs to invoke a C# function.