473,549 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Redire ct Posts back?

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.redire ct after the Conn.Close to leave the application and just go
to another page.

No matter where I put this Response.Redire ct, it causes a blank row to be
inserted into the database in addition to the intended row. Its like the
Response.Redire ct 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.
Nov 18 '05 #1
2 1872
Have you tried setting database connection to nothing before the redirect?

"Sam Miller" <Sa*******@disc ussions.microso ft.com> wrote in message
news:BF******** *************** ***********@mic rosoft.com...
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.redire ct after the Conn.Close to leave the application and just go to another page.

No matter where I put this Response.Redire ct, it causes a blank row to be
inserted into the database in addition to the intended row. Its like the
Response.Redire ct 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.

Nov 18 '05 #2
If your using VB rem out the Response.Redire ct 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
"Sam Miller" <Sa*******@disc ussions.microso ft.com> wrote in message
news:BF******** *************** ***********@mic rosoft.com...
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.redire ct after the Conn.Close to leave the application and just go to another page.

No matter where I put this Response.Redire ct, it causes a blank row to be
inserted into the database in addition to the intended row. Its like the
Response.Redire ct 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.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
26793
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as follows: private void SubmitButton_Click (object sender, System.EventArgs e) { // Set up the response to write the print file to the client...
3
3470
by: michael_vanommeren | last post by:
I have two web applications that I am working with and I am trying to do a Response.Redirect from one to the other. They are setup as separate web applications on the same IIS server. If I go directly to the second application in a browser, all of my events fire correctly. However, if I have the first application do a Response.Redirect to...
1
2732
by: MikeM | last post by:
We are getting a behavior on a Response.Redirect("SomeUrl", True) that I'm hoping someone can explain. This all refers to the code snip at the end. By the way, this is all VB ASP.NET v1.0 code. So we have the Page_Load event of an ASPX page fire which in the snip you see calls "SomeMethod". Also you see in Page_Load two Catch statements. ...
4
1660
by: batista | last post by:
Hello All, I want to know the Difference Between Server.Transfer() And Response.Redirect()?
0
1382
by: Clas | last post by:
Hello! I have written a javascript which posts back a page with __doPostBack if a user presses the escape-button on the keyboard. Then in Page_Load I´m doing a response.redirect to another page. This scripts only works for me if the page (which had the page_load with the response.redirect) is in a frameset environment. If the page is not...
6
3851
by: dwclark | last post by:
I am having an issue when I trigger a Response.Redirect, the Page_Load fires on the page where the Response.Redirect was called. From what I've read, this should not happen and the browser should be sent to page that was passed in teh Response.Redirect page. The AutoEventWireup is set to false on all pages. Any help would be greatly...
5
4549
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks a session variable, and if it is not present, does a Response.Redirect to a webpage for the CAS passing a url parameter for the url to post back...
4
7609
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches. Recently somebody pointed out to me that you can't just press ENTER anymore after typing in the TextBox but that you HAVE to click on the submit...
11
2462
by: Paul Furman | last post by:
I'm setting up credit card payment through authorize.net and they have the option to send a POST string back to my site once complete. I'm not sure how to proceed. They don't have much to read about this, their tech support seemed to think I've got the general idea though & said I might have have my hosting server set up permissions to recieve...
0
7524
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6048
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5372
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5089
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3501
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
766
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.