Response.Redirect Posts back?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a submit button. In the event handler for that button I connect to
database and write all the control values to the db. Then I have a
response.redirect after the Conn.Close to leave the application and just go
to another page.

No matter where I put this Response.Redirect, it causes a blank row to be
inserted into the database in addition to the intended row. Its like the
Response.Redirect causes a postback and all the controls are refreshed to
nothing and all blanks written into the database.

But you don't see any of this happen. It just goes too quickly and the
browser goes to the intended page. But there is always this extra row in the
db.

I tried taking it out of the Button handler and putting inside a If
Page.IsPostback under onload. Also tried putting it in a sub and calling the
sub after Conn.close in the button handler.

No Luck.
Any help would be greatly appreciated.
 
If your using VB rem out the Response.Redirect and put in a
Response.Write("Event Fired")

If you see "Event Fired" on the screen more than once your click event is
firing more than once, I had this problem a lot when I started .NET but only
with VB sites, C# never had this problem.


--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk
 
Back
Top