ASP.Net Multiple PostBack Issue

G

Guest

I am currently having an issue with an ASP.Net 1.1 Web page that does the
following remotely but not locally.

Click on a control
Check for postback, if postback, handle the event, otherwise populate page
with options.

What is happening is that remotely the page is doing a double postback, then
doing a post without data at all resulting in the event being fired twice,
then redirecting to the incorrect option in a dropdown (going to default).

Locally, this problem does not exist, remotely it is causing some major
issues, as when you add a record, it is double adding it. This is for a
financial estimation add-on for great planes that was working fine 3 weeks
ago, and now for some reason remotely this issue is happening more and more
frequently with more then just this control.

I have researched a bit, and seen that SP1 for .Net 1.1 has been causing
some issues, the question I have is, has anyone else seen this type of
behavior, and should I try a rollback to pre-SP1 for .Net 1.1 ?

Thanks in advance,
Tom Anderson
Sr. Software Developer
Custom Business Solutions Inc.
 
G

Guest

Thank you for that link, but i am already using AutoEventWireUp ="false".

The problem isn't internal multiple calls on functions, the problem is
multiple postbacks from the client.
 
B

Bruce Barker

check your weblogs to see if the client is actually posting twice. if so,
then probably a problem with a autopostback control (one that uses
javascript to post). anyway, if the client is doing a double post, then use
a network sniffer (preferably one with protocol support) to see the packets
and the cause should be obvious.

-- bruce (sqlwork.com)
 
G

Guest

It almost seems like the page is too big for the renderer to render...

Granted this page will have anywhere from 15-500 controls dynamically added
to it.

I tried what you suggested, and it will try to get the data, then at the
exact same spot it will disconnect, and reconnect to request it again, like
the server is disconnecting the user.

Any suggestions?

W3 log shows normal activity, as well as packet sniff, just it disconnects
midcource, and starts over on an eternal loop.
 
G

Guest

Well, even after optimizing the page, and taking out 4/5ths of the data on
the page, it still does it, just not as often...

WTH is up with this issue?
 
Joined
Oct 2, 2007
Messages
1
Reaction score
0
In my case, the double events where due to the fact that both the button itself and the function where wired up to each other.

1. The button where declared
<asp:Button ID="btnCategoryNewSave" runat="server" Text="Spara" CssClass="fBtn" OnClick="btnCategoryNewSave_Click" />

2. The function where also wired up
Protected Sub btnCategoryNewSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCategoryNewSave.Click


Deleted the OnClick from the button, works like a charm.


BR/
 
Joined
May 10, 2010
Messages
3
Reaction score
0
Hi Guys,

This is very old post, but people still looking at this for solution exactly same as I did last week.

Like Grengby said Double events are primary reasons - but removing one of them is not allways an option. Atleast on my case and I had to resolve this on 3rd party's application.

I added following script and amended ASP form on masterpage:

<script>var Q = 0;</script>
<form id="Form1" runat="server" onsubmit="Q++; if(Q==1){return true;} else { return false;}">

This seems to be working and please forward your comments.

Arun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top