Disable the postback on an

前端 未结 17 1559
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 00:18

I have an ASP.NET linkbutton control on my form. I would like to use it for javascript on the client side and prevent it from posting back to the server. (I\'d like to use t

17条回答
  •  天命终不由人
    2020-12-03 01:02

    You might also want to have the client-side function return false.

    
    

    You might also consider:

    Click Me
    

    I use the clickable class to set things like pointer, color, etc. so that its appearance is similar to an anchor tag, but I don't have to worry about it getting posted back or having to do the href="javascript:void(0);" trick.

提交回复
热议问题