472,353 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

page_load sometime execute twice with webbrowser conmtrol post

Hi Everyone,

I am using webbrowser control to post data to an aspx page. However, for
some reason, the aspx page sometimes will execute page_load event twice, and
sometimes execute it once. So I might get different results for executing it.

If I have the webbrwoser control to call it the first time, the aspx will
usually execute the page_load twice.

What can be the problem?

Thanks much in advance...
Nov 18 '05 #1
4 2887
In your page directive, is your AutoEventWireup set to true or false? If it
is set to true, set it equal to false. Are you doing any Response.Redirects
in your code anywhere?
--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Hi Everyone,

I am using webbrowser control to post data to an aspx page. However, for
some reason, the aspx page sometimes will execute page_load event twice, and sometimes execute it once. So I might get different results for executing it.
If I have the webbrwoser control to call it the first time, the aspx will
usually execute the page_load twice.

What can be the problem?

Thanks much in advance...

Nov 18 '05 #2
Alex,
In my page directive, AutoEventWireup is set to false.
Yes I have Response.Redirects at the end of the page_load, and I am using
Response.Redirect ("nextpage.aspx", false); to avoid ThreadAbortException
exception. I was suspecting that has something to do with the behavior of the
page, but was not sure why.

Thanks,
Julia
"news.microsoft.com" wrote:
In your page directive, is your AutoEventWireup set to true or false? If it
is set to true, set it equal to false. Are you doing any Response.Redirects
in your code anywhere?
--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Hi Everyone,

I am using webbrowser control to post data to an aspx page. However, for
some reason, the aspx page sometimes will execute page_load event twice,

and
sometimes execute it once. So I might get different results for executing

it.

If I have the webbrwoser control to call it the first time, the aspx will
usually execute the page_load twice.

What can be the problem?

Thanks much in advance...


Nov 18 '05 #3
Julia,

Without seeing your code, I can say from my experiences that I came across
situations where I thought the Page_Load was being called twice. The reason
this was true, or seemed like it, was because I had Response.Redirects in my
page. Sometimes it throws a logic wrench into the gears and it makes you
wonder what's going on. If you step through your Redicts, you may find that
it working as the codes says it should. Are you having any issues where
there are duplicate control populations or anything? What's your page_load
function look like, if it's not too big to post?

--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:3E**********************************@microsof t.com...
Alex,
In my page directive, AutoEventWireup is set to false.
Yes I have Response.Redirects at the end of the page_load, and I am using
Response.Redirect ("nextpage.aspx", false); to avoid ThreadAbortException
exception. I was suspecting that has something to do with the behavior of the page, but was not sure why.

Thanks,
Julia
"news.microsoft.com" wrote:
In your page directive, is your AutoEventWireup set to true or false? If it is set to true, set it equal to false. Are you doing any Response.Redirects in your code anywhere?
--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Hi Everyone,

I am using webbrowser control to post data to an aspx page. However, for some reason, the aspx page sometimes will execute page_load event twice,
and
sometimes execute it once. So I might get different results for
executing it.

If I have the webbrwoser control to call it the first time, the aspx

will usually execute the page_load twice.

What can be the problem?

Thanks much in advance...


Nov 18 '05 #4
Alex,

You're right on it.

The main Response.Redirect did in return calling page_load function again
sometimes, and this is preplexing to me. If I am redirecting it to an asp
page that is has no relationship to this aspx page, what would cause it to
call this aspx page again? Any pointers?

Thanks so much,
Julia

"Alex" wrote:
Julia,

Without seeing your code, I can say from my experiences that I came across
situations where I thought the Page_Load was being called twice. The reason
this was true, or seemed like it, was because I had Response.Redirects in my
page. Sometimes it throws a logic wrench into the gears and it makes you
wonder what's going on. If you step through your Redicts, you may find that
it working as the codes says it should. Are you having any issues where
there are duplicate control populations or anything? What's your page_load
function look like, if it's not too big to post?

--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:3E**********************************@microsof t.com...
Alex,
In my page directive, AutoEventWireup is set to false.
Yes I have Response.Redirects at the end of the page_load, and I am using
Response.Redirect ("nextpage.aspx", false); to avoid ThreadAbortException
exception. I was suspecting that has something to do with the behavior of

the
page, but was not sure why.

Thanks,
Julia
"news.microsoft.com" wrote:
In your page directive, is your AutoEventWireup set to true or false? If it is set to true, set it equal to false. Are you doing any Response.Redirects in your code anywhere?
--
Alex Mueller

"Julia" <Ju***@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
> Hi Everyone,
>
> I am using webbrowser control to post data to an aspx page. However, for > some reason, the aspx page sometimes will execute page_load event twice, and
> sometimes execute it once. So I might get different results for executing it.
>
> If I have the webbrwoser control to call it the first time, the aspx will > usually execute the page_load twice.
>
> What can be the problem?
>
> Thanks much in advance...


Nov 18 '05 #5

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

Similar topics

8
by: Andy | last post by:
Visual Studio 2003 web form problem using C#. My Page_Load or OnInit routines seems to be called twice for every post back to the server. I...
1
by: Jon | last post by:
Hi, I've set up a new web form (new.aspx) that inherits a BasePage class. The new web form contains an override Page_Load event. In BasePage,...
1
by: bminder | last post by:
In the asp.net pages below, Common.vb has an overridable Page_Load sub. In the consuming page, Two.aspx, the Page_Load sub is inherited, but for...
7
by: Nimrod Cohen | last post by:
Hi During the page_load of my Aspx page "http://myMachine/MyWebApp/Quote.aspx" , i write to the response an html that embeds a form with the...
3
by: erdem | last post by:
hi, i have a problem with asp.net when i was debugging i put breakpoint to pageload event and then i discovered that page is loaded once...
2
by: magister | last post by:
Does smartnavigation on parent page make user controls page_load twice... Any fixes for this!!! Problem is when boss sees smartnavigation he...
14
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void...
17
by: Arpan | last post by:
When a Button is clicked in a Web Form in an ASPX page, the Form will post back to itself. Under such circumstances (i.e. when a Button is...
4
by: David C | last post by:
I spent the last four hours trying to figure out why Page_Load would execute twice. Even stranger was that everything within if (!...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.