Can I create an ASP.NET ImageButton that doesn't postback?

前端 未结 8 479
无人及你
无人及你 2020-12-11 17:25

I\'m trying to use the ImageButton control for client-side script execution only. I can specify the client-side script to execute using the OnClientClick property, but how d

相关标签:
8条回答
  • 2020-12-11 17:54

    Use OnClientClick to write your script and PostBackUrl="javascript:void(0);" to avoid postback

    0 讨论(0)
  • 2020-12-11 17:57
    <image src="..." onclick="DoYourThing();" />
    
    0 讨论(0)
提交回复
热议问题