title: asp.net: response.redirect not working
body: <p>I have a .aspx form in which I have a combobox holding subject I retrive from a DB-table.</p>
  
  <p>A submit button clicking on which questions related to that subject are viewed in a gridview.</p>
  
  <p>I do it by calling the function FillGrid() in the button click event.</p>
  
  <p>I also have pageindexchanging for my gridview in which FillGrid() is again called.</p>
  
  <p>In my FillGrid() function I have used a try catch block. If an error occurs I want to redirect the page to error page using Response.Redirect(). The problem is this response.redirect is not working. One of the reasons of it is that on button click the form is posted twice. Because after reaching to response.redirect statement flow comes back to button click where FillGrid is called().</p>
  
  <p>How can I solve this? Or to put simply, how can I prevent double posting of the form?</p>