473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Page Loads again

May be I am missing something but I find this behavior odd.

I am running an application which runs a stored procedure upon clicking a
button.
The stored procedure is called in the Click event of the button

However, after some time (when the stored procedure is still executing) the
ASP.NET page code seems to load all over again (as if the page was
refreshed), including the Click event. This causes the stored procedure to
execute another time as well.

I am quite confused with this since I have seen this for the first time.
If I have just a smaller process running in the Click event instead of the
time consuming stored procedure, everything works as normal and the
application returns.

Thank you in advance for your help.
Nov 18 '05 #1
3 1267
Is there a Meta-refresh tag in the client code that was generated?

--
Girish Bharadwaj
http://msmvps.com/gbvb
"Vincent Keller" <si**********@hotmail.com> wrote in message
news:u$****************@TK2MSFTNGP14.phx.gbl...
May be I am missing something but I find this behavior odd.

I am running an application which runs a stored procedure upon clicking a
button.
The stored procedure is called in the Click event of the button

However, after some time (when the stored procedure is still executing) the ASP.NET page code seems to load all over again (as if the page was
refreshed), including the Click event. This causes the stored procedure to
execute another time as well.

I am quite confused with this since I have seen this for the first time.
If I have just a smaller process running in the Click event instead of the
time consuming stored procedure, everything works as normal and the
application returns.

Thank you in advance for your help.

Nov 18 '05 #2
User Controls in the page? If so, you could be bubbling up events.
Improper use of Page_Load can also create some issues.

There are some settings in the @ directive to stop some of the behaviors
that can cause this. I would debug through and see what is causing the double
submit (client side or in the code). Some versions of IE had a double submit
bug, BTW.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Vincent Keller" wrote:
May be I am missing something but I find this behavior odd.

I am running an application which runs a stored procedure upon clicking a
button.
The stored procedure is called in the Click event of the button

However, after some time (when the stored procedure is still executing) the
ASP.NET page code seems to load all over again (as if the page was
refreshed), including the Click event. This causes the stored procedure to
execute another time as well.

I am quite confused with this since I have seen this for the first time.
If I have just a smaller process running in the Click event instead of the
time consuming stored procedure, everything works as normal and the
application returns.

Thank you in advance for your help.

Nov 18 '05 #3
It also happens when the event has been called twice..
for EX:

OnClick="btnSubmit_Click" in aspx page

AND in codebehind page

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click

End Sub

"Vincent Keller" wrote:
May be I am missing something but I find this behavior odd.

I am running an application which runs a stored procedure upon clicking a
button.
The stored procedure is called in the Click event of the button

However, after some time (when the stored procedure is still executing) the
ASP.NET page code seems to load all over again (as if the page was
refreshed), including the Click event. This causes the stored procedure to
execute another time as well.

I am quite confused with this since I have seen this for the first time.
If I have just a smaller process running in the Click event instead of the
time consuming stored procedure, everything works as normal and the
application returns.

Thank you in advance for your help.

Nov 18 '05 #4

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

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
1
by: VJ | last post by:
I have a ASP.NET page Main.aspx with 4 frames. The center frame loads the login.aspx file. The other three load gif file or html files. The Main.aspx is the start page for my website Now I am...
6
by: DotNetGruven | last post by:
I've got a page that does a search... There is an ImageButton on it that allows the user to reset the search. The Click Handler for the button clears out the Data and then redirects to the same...
1
by: spammy | last post by:
Hi all, Im having difficulty serving synamically generated PDFs to clients via asp.net. Im using crystal reports to generate them. In my page load I have the following: private void...
10
by: darrel | last post by:
I have this structure: mypage.aspx (class = mypage) myusercontro.ascx On the mypage.aspx I can declare a variable: animal = "monkey" I can read this from the UC by simply doing this:...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
1
by: jeff_m | last post by:
Hello all, I'm having an issue with the following: I have an .aspx page with two html links that call distinct Javascript functions. I also have an iframe in the html of this .aspx page....
7
by: Schmidty | last post by:
Okay...I have another 'newbie' question; I have a function that loads a page and the action is $_SERVER; In the form that is in a function(method?) within a class a variable is passed back to...
8
by: Harvey Schmidlapp | last post by:
I have a fairly complex form (generated by means of an ASP 3 page). The form is used to define a query against a database. After running a query, the user hits their browser's back button and goes...
0
by: Silgd1 | last post by:
Hi All..... I have written a method in a java class that accesses the mysql backend db to check if a process is still running. If the process is still running, a JOptionPane is produced informing...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.