javascript - Calling OnClientClick from Code behind in Asp.net VB -
i have code :
<asp:linkbutton runat="server" id="hl_konfirmasipemesanan" class="button-primary button-shadow" causesvalidation="false" validationgroup="validasidata" onclientclick="return getconfirmation(this);" ></asp:linkbutton>
then want call onclientclick="return getconfirmation(this);"
in code behind, tried:
hl_konfirmasipemesanan.attributes.add("onclientclick", "return getconfirmation(this);")
but doesn't work, how can that?
you can this:
dim script string = "<script>var btn = document.queryselector('.button-primary'); getconfirmation(btn);</script>" clientscript.registerstartupscript(me.gettype(), "click_btn", script)
Comments
Post a Comment