c# - linkbutton in gridview has different id and do postback event target it should be same? -


href="javascript:__dopostback('grid1$ctl02$lkbdelete','')" id="grid1_lkbdelete_0" 

full link is:

<a onclick="javascript:return popupdialouge(&#39;&lt;b>are sure want delete record?&lt;/b>\nbecause process related comments record\nwill deleted.&#39;,&#39;confirmation&#39;,&#39;delete&#39;,&#39;cancel&#39;,this,&#39;ui-icon-alert&#39;);" id="grid1_lkbdelete_0" name="lkbdel" href="javascript:__dopostback(&#39;grid1$ctl02$lkbdelete&#39;,&#39;&#39;)">delete</a>

actually want custom postback capturing eventargument here can event target should same event target different can't cause manual postback

i did myself changed gridview clientid mode static auto replaced underscores _ linkbtn id doller $ worked.

var ctlid=this.id.replace(/_/g,'$'); function postback(){ __dopostback(ctlid,''); } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -