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

Hi,
I have a asp.net 2005 web project which was asp.net 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 = window.open(openURL, "printWindow", "width=800,height=" + WHeight + ",menubar=yes,scrollbars=yes,resizable=yes,left=0,top=60");  
      pw.focus();
}

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?

thanks,
Young
young_nacsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
Just set the "AutoPostback" property of the ImageButton to false.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TimCotteeHead of Software ServicesCommented:
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
0
manojkumarpsCommented:


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.

Manoj
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.