0

I want to avoid postback for following control It works fine . But when i click on that control ,all postback of other controls on the page also does not occur.Before click on following all works fine.

  <div class="close_but">
          <asp:ImageButton ID="imgbtnEChartZoomClose" runat="server" ImageUrl="images/close.png" OnClientClick="javascript:zoomclosepopup();" PostBackUrl="javascript:void(0);" />
       </div>

I dont know what to do now .Please help me

Somnath Kharat
  • 3,570
  • 2
  • 27
  • 51

1 Answers1

2

try this, remove PostBackUrl="javascript:void(0);", and add return false to OnClientClick :

<asp:ImageButton  OnClientClick="javascript:zoomclosepopup();return false;" ID="imgbtnEChartZoomClose" runat="server" ImageUrl="images/close.png" />
Somnath Kharat
  • 3,570
  • 2
  • 27
  • 51
HenryChuang
  • 1,449
  • 17
  • 28
  • Thanks for your answer .It works fine.will you explain me what return false makes sense – Somnath Kharat Jun 14 '13 at 09:11
  • What sense do return false do – Somnath Kharat Jun 14 '13 at 09:38
  • 1
    I think "return false" will tell browser stop doing things when event handle, it seems no document specification for this. It has discussed here : http://stackoverflow.com/questions/128923/whats-the-effect-of-adding-return-false-to-an-onclick-event – HenryChuang Jun 14 '13 at 09:39