Cancel button in form

后端 未结 9 2079
借酒劲吻你
借酒劲吻你 2021-02-05 14:28

I have a cancel button in a form:

@using (Html.BeginForm(\"ConfirmBid\",\"Auction\"))
        {
          some stuff ...

                    

        
9条回答
  •  星月不相逢
    2021-02-05 14:36

    So with Shyju's appraoch, you use the built in MVC ActionLink helper. Doing this, you'll need to have any images or icons done through css. However, this is much more cachable, especially if you use base64 strings for your images in css.

    I like Adauto's approach because it gives you much more control of the markup. MVC Html Helpers are nice, but they still seem to have their heads in the WebForms mindset of "don't worry about it, we'll take care of it for you".

    The one thing I would add is Url.Content.

    
    

    It's never really a good idea to make your views have to know the location of content relative to it's location.

提交回复
热议问题