3

Two buttons, one work

 2 years ago
source link: https://www.codesd.com/item/two-buttons-one-work.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Two buttons, one work

advertisements

I have two buttons and only one work...

@using (Html.BeginForm("Edit", "Employer"))
 {

                <button name="Edit_hours">Edit</button>
 }
</td>
<td>

 @using (Html.BeginForm("Cancel", "Employer"))
 {

                <button name="Back">Back</button>
 }

Back button work properly, but the Edit button dasn't want work... Controller and View should be good.

controller:

public ActionResult Edit()
        {
            return View();
        }

View:

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

I don't understand why it doesn't work ;/


If you are trying to submit your form, then you need a submit. You should have something like

<input type="submit" value="Edit" id="editSubmit" />

button doesn't really have any implicit behaviour, so I don't know what you mean by 'it doesn't work'.

Related Articles

Two buttons, one click

I have two buttons on top of each other in my nib. I need both of them to be pressed when tapped, but only the top button carries out its function. Is there a way for the top button to tell the bottom button to activate when the top one gets pressed.

Two buttons one line (Bootstrap forms the theme for Symfony2)

I'm using the Bootstrap form theme for Symfony2 (bootstrap_3_horizontal_layout.html.twig): I've added two buttons on a form: $builder // some code here ... ->add('save', 'submit', ['label' => 'save']) ->add('cancel', 'submit', ['label' => 'can

The erroneous button is clicked with a page with two buttons

I'm using Selenium Webdriver to test a web page. The web page http://www.leaseplan.nl/contact/index.asp has two buttons, one button with button text 'Zoeken' and one with button text 'Verstuur'. I want to click on the button with button text 'Verstuu

AlertDialog shows only one of the two buttons

I want to display an alert with two buttons: "Reprendre" and "Plus Tard". I have the below code: alertsyncincomplete = new AlertDialog.Builder(this); alertsyncincomplete.setCustomTitle(titleAlertSyncIncomplete); alertsyncincomplete.set

Android: two buttons, but the action by pressing one happens only after the other is pressed too

I have two buttons in my application, one is to to start Google Voice and the other is to exit the application. However, when I press the voice button, it doesn't do anything until after I press the exit button too. So, the app exits, but then Google

The problem of wrapping LinearLayout text by having two buttons of the same size plus one stretched at the center

Looks like there's a plenty of questions about centering, same size etc, but so far I didn't find the exactly my case so I dare to ask :) What I need is a layout of three buttons like this: [ previous ][*select*] [ next ] where [previous] and [next]

One shape, two buttons?

I have a form. I want it to have two buttons (buttonA, buttonB). Is there a better way to figure out which button was clicked than keeping a hidden input field, and setting its value via javascript in onClick() to a different string for each? This is

How to make two buttons in one?

I have two buttons: <button type="button" id="foo">off</button> <button type="button" id="bar">on</button> and I have a console that is logging every 1 second "on": function disable

one touch on two buttons at the same time

My app has 2 buttons, near. I'm trying to touch this two buttons, at the same time, using only one finger. There is a way to check if the touch is over this two buttons at same time?You can (but really shouldnt) touch 2 buttons with one finger like A

The two-button call on the same page does not work

I have an MVC5 application with a table and when you click on create it navigates to new page with a form to put data and save. Currently this is working fine, the problem is that I need to add an additional button which calls new action but will not

switch the css class to two buttons when one of the two is clicked

import React, { Component } from 'react'; class Buttons extends Component { constructor(props) { super(props); } render() { return ( <div className="displayButtons"> <input className='button1' onClick={this.props.get_menu_items_api} val

Using two readers, one is nested in the other

Currently i am trying to dynamically generate some buttons for a music player i am developing and i am currently trying to retrieve album art from the tags of the music so that it can be added as a background image for the button. My current method o

Display text with two buttons at the bottom

I need simple text view with bottom two buttons, in XML Like this I have tried to work with two button at bottom side with relative view , but could not success and not able to add text view can any one have any idea , pleaseUse this layout <?xml ver

How to make two buttons in the column?

How can I make two buttons in a column and center? I tried with flexbox, but when I add flex-direction:column it makes buttons to width 100% I need like this HTML <form> <button type="button">Regulamin</button> <button type=

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK