![]() |
|
|
|||||||
![]() |
DotNet - asp.net page load twice problem |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi there
I have one application use C# for asp.net, when I debug and write code inside the page_load, it is loading twice, also I put IsNotPostBack, it still load two times, any one have the same problem, and how to solve it? by the way, I am using asp.net 1.1 version. Thanks Tony Tony Dong |
|
|
|
|
#2 |
|
Posts: n/a
|
Tony, I had this problem today and spent quite a few hours on it.
Finally I found out it was one of the <td> attributes that was causing the problem. The "background" attribute was assigned a color code, where it was probably expecting an image, a file, or something. Here is the partial code: <TD valign="bottom" align="left" background="#B6C8DE"> bgColor, not background, should be assigned a color code. But when you cut and paste in a hurry in the Properties Window in the .net IDE, sometimes that happens. Your page may not have the same problem as mine, but it most likely involves an error condition, or a bad reference. Yisheng Tony Dong wrote: > Hi there > > I have one application use C# for asp.net, when I debug and write code > inside the page_load, it is loading twice, also I put IsNotPostBack, it > still load two times, any one have the same problem, and how to solve it? > > by the way, I am using asp.net 1.1 version. > > Thanks > > Tony |
|
|
|
#3 |
|
Posts: n/a
|
Really? It wud be interesting to know how is this affecting the postback ?
-- Thanks and Regards, Ashish Gupta "Yisheng" <> wrote in message news: oups.com... > Tony, I had this problem today and spent quite a few hours on it. > Finally I found out it was one of the <td> attributes that was causing > the problem. The "background" attribute was assigned a color code, > where it was probably expecting an image, a file, or something. Here > is the partial code: > > <TD valign="bottom" align="left" background="#B6C8DE"> > > bgColor, not background, should be assigned a color code. But when you > cut and paste in a hurry in the Properties Window in the .net IDE, > sometimes that happens. Your page may not have the same problem as > mine, but it most likely involves an error condition, or a bad > reference. > > Yisheng > > Tony Dong wrote: > > Hi there > > > > I have one application use C# for asp.net, when I debug and write code > > inside the page_load, it is loading twice, also I put IsNotPostBack, it > > still load two times, any one have the same problem, and how to solve it? > > > > by the way, I am using asp.net 1.1 version. > > > > Thanks > > > > Tony > |
|
|
|
#4 |
|
Posts: n/a
|
Ashish wrote:
> Really? It wud be interesting to know how is this affecting the postback ? > > > -- > Thanks and Regards, > Ashish Gupta I encountered this, too (with having an empty background value). This seems to be a problem with alternative browsers only as it did show only in Firefox and Opera. To me it seems like the parser is skipping the page or something - and requesting it once again to be sure the data send was not skipped or so. My 2c Andreas |
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2008
Posts: 1
|
Hi guys (+/girls),
I too had this error, and after some hours of debugging I found out, it was because of an empty src-attribute in an image-tag, e.g. <img src="" alt="" /> In the end of my pageload, I was setting this value dynamically via javascript, which is why I didn't figure it out at first. But I hereby confirm, that at least firefox will reload the page (silently, though) if this "error" is present. The problem wasn't there in IE7, and I haven't tested other browsers. Hope this helps somebody. Regards, Frederik Schøning |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Aug 2008
Posts: 1
|
Thank you Frederik, your solution solved the problem for me.
I had src="" in an IMG and also an IFrame, I don't know if the iframe also causes it. It was only affecting Firefox. I would never have solved it without your help! |
|
|
|