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... 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...
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...
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...
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... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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 (!...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
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...
|
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...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
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...
|
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...
|
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...
|
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...
|
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...
| |