How to stop page post back when I used image button by javascript in 2005?

Posted on 2006-04-10
Last Modified: 2012-08-14
I have a 2005 web project which was 2000 project before. After I converted to 2005 from 2000, somehow page is post back to rebuild the page when I click a image button to open brand new popup window to show something.
I am using clinet javascrip to open new popup window by :
<input type="Image" src="...."  in aspx page.

Button clicked invoked a function at the bottom.

function Opensheet(openURL)
    WHeight = window.screen.availHeight - 150;
      pw =, "printWindow", "width=800,height=" + WHeight + ",menubar=yes,scrollbars=yes,resizable=yes,left=0,top=60");  

Popup window is working fine but parent page is trying to rebuild page again without URL QueryString value so page got error because there is no value.
How to stop posting back ?
Is it new feature in 2005? required learning curve?

Question by:young_nacs
    LVL 52

    Accepted Solution

    Just set the "AutoPostback" property of the ImageButton to false.
    LVL 44

    Expert Comment

    Hi young_nacs,

    If that doesn't work then use:

    <input type="image" src="...." Onclick="Opensheet('someurl');return false;">

    The return false will stop it posting back.

    Tim Cottee
    LVL 2

    Expert Comment


    The image has a property called Autopostback with values true and false. Ity should be set to true now. So as soon as you click  it it is postbacking. Set the property as false and run again.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now