Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:30:25+00:00 2026-06-10T21:30:25+00:00

My problem is I’m trying do something to on mvc webforms page name =

  • 0

My problem is I’m trying do something to on mvc webforms

page name = addition.aspx 
event = button1_click
int numberOne = convert.toint32(textbox1.text);
int numberTwo = convert.toint32(textbox2.text);
int myResult = numberOne + numberTwo;
label1.text = myResult.Tostring();

.

page name = addition.aspx (same page) 
event = button2_click
int numberthree = convert.toint32(textbox3.text);
int numberfour = convert.toint32(textbox4.text);
int myResult2 = numberOne + numberTwo;
label2.text = myResult2.Tostring();

my question is I want to do sameting for MVC ( where is event … i guess i have to conversion on the page post and page get … am i wrong)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:30:27+00:00Added an answer on June 10, 2026 at 9:30 pm

    You don’t have server side controls for MVC. If you are wanting to have two buttons trigger different events you have a couple options. JQuery is included in your MVC project by default, and it’s very popular. So I will show you some examples with that.

    Create the two submit buttons to toggle the form action before submit.

    Example using jquery:

    HTML

    <form action="">
       <input type="submit" id="first" value="first" />
       <input type="submit" id="second" value="second" />
    </form>
    

    JS

    $(function(){
        // on document ready wire up click events  
    
        // handle click event for first button
        $('#first').on('click', function(){
             $('form').prop('action', 'PostActionOne'); // set the action on the form to handle first button post
        });
        // handle click event for second button
        $('#second').on('click', function(){
             $('form').prop('action', 'PostActionTwo'); // set the action on the form to handle second button post
        });
    });
    

    Another option:

    Use two buttons with a click event that executes an ajax request to handle the scenario.

    HTML

    JS

    $(function(){
        // on document ready wire up click events  
        $('#first').on('click', function(){
              $.ajax({
                 type: 'POST',
                 url: 'PostActionOne,
                 data: data,
                 success: success,
                 dataType: dataType
             });
        });
    
        $('#second').on('click', function(){
              $.ajax({
                 type: 'POST',
                 url: 'PostActionTwo,
                 data: data,
                 success: success,
                 dataType: dataType
             });
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I am trying to build a recursive tree using a function and data
Problem, simple and annoying. Im just trying to print a list of names, collected
Problem Given the following XML configuration file: <main> <name>JET</name> <maxInstances>5</maxInstances> <parameters> <a>1</a> <b> <b1>test1</b1>
Problem: * I'm trying to calculate the number of consecutive absence each student have
Problem : Trying to read from some electronic scales using the comport via Java
PRoblem: i'm trying to create (just for fun) a simple poker card (with a
Problem: Trying to create a Mix that is applied to the AVPlayerItem, but it
Problem in short: I'm trying to make a simple show/hide toggle work on just
Problem Why would compiling a program which has an int main(void) main function differ
Problem: Been struggling to get my code to load external shaders and it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.