Asp button with different button type

后端 未结 5 441
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 06:11

Is it possible to have an asp button that isn\'t rendered with a type=\"submit\" tag. I don\'t want the button to submit the form, so I\'d like to have it as

5条回答
  •  无人及你
    2020-12-06 06:55

    You can just set UseSubmitBehavior="false" and it will render type="button" instead of type="submit" (.net 4 at least)

提交回复
热议问题