Why Is Linkbutton Not Executing The Click Function From Code Behind
I have a GridView which has these two controls:
Solution 1:
If You Remove Both
OnClientClick="return false;"
and
PostBackUrl="JavaScript:void(0);"
then definitely it will postback.
You can observe your HTML generated/rendered if you set both attributes with Postback event
WebForm_DoPostBackWithOptions
which should be something like
javascript:__doPostBack('BookingResults$ctl02$btnShow2','')
<ahref="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("BookingResults$ctl03$btnShow2", "", false, "", "JavaScript:void(0);", false, true))"class="btnSearch2"id="BookingResults_btnShow2_1">View Alls</a>
Post a Comment for "Why Is Linkbutton Not Executing The Click Function From Code Behind"