Asp button with different button type

后端 未结 5 435
被撕碎了的回忆
被撕碎了的回忆 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

    If you don't want the button to submit, do you need a button at all ? After all, it doesn't do anything before it posts back to the server. You can might as well just use an .

    That being said, you can use javascript to prevent a postback:

    
    

提交回复
热议问题