English 中文(简体)
两个州,只有一个工作
原标题:Two buttons, only one work

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.

控制器:

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

观点:

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

我不理解为什么不工作?

最佳回答

如果你试图提交表格,则需要<代码><>>>>。 你应该有这样的东西。

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

确实没有任何含蓄的行为,因此,我不知道你为什么不工作。

问题回答

你们必须改变祖国,提出以下表格:

<input type="submit" name="button" value="Cancel" />

这样,你的形式就会公布。 然而,正如@ Wattengård在评论中所说的那样,这不是网上广告。





相关问题
C# Building An Array with Button Entries

I have a set of buttons that I want to add into an array so that they are ordered. The buttons I have are: Monday0700Button Monday0730Button Monday0800Button Monday0830Button and so on. How do I ...

Text in disabled and css styled button shows movement in IE

I have disabled and css styled buttons. In Firefox, disabled buttons do not move at all when pressed (which is what is expected), in IE, the text in the buttons still moves a few pixels. Why does ...

Where is Button.DialogResult in WPF?

In System.Windows.Forms.Button there is a property DialogResult, where is this property in the System.Windows.Controls.Button (WPF)?

How to create a submit button template in Oracle APEX?

I m trying to create a template for a button in Oracle APEX but I don t seem to have access to the appropriate substitution strings to make it work. For non-templated buttons APEX seems to insert a ...

Removing text from HTML buttons on all browsers?

We have buttons of many sizes and colors that use background images. There is a label on the background image itself, but we need to keep the button s text in the HTML for usability/accessibility. How ...

Back button loop with IFRAMES

In my (school) website we use Iframes to display class blogs (on blogger). This works well EXCEPT if the user then clicks on (say) a photo inside the iframe. Blogger (in this case) then displays the ...

ruby on rails on click events

I am so sorry if this question seems too easy but I can t seem to find it anywhere. I am creating a ruby in steel project. I have created a html.erb and rb file in a vs project (ruby on rails). My ...

热门标签