D
doobdave
Hi all,
I'm experiencing a rather strange problem:
I am coding a web application using VB.net ASP.net and Visual Studio
2003.
It's quite a large application, but the problem only occurs on one of
the Web User Controls.
This particular Web User Control has some text entry fields in it,
drop-downs etc... and a button which brings up a pop-up form.
The pop-up form is used to add a new entry into one of the listboxes
on the 'parent' form. The pop-up is a modal (created using
window.showmodaldialog), and when it's closed, the 'parent' form is
resubmitted using javascript, and the listbox repopulated to show the
newly added item(s).
All this is working fine.
However, on some occasions (and I can't work out what differences
are), when the pop-up form closes, the parent page loads and the page
events fire in the following sequence:
- Page_Load
- Page_Load checks if postback=true, then loads a listbox control with
the items that need to be in it.
- Page_Load fires again....
Now this appears to be happening randomly, and when this happens, the
listbox does not contain the newly-added entries.
On some occasions (I am doing exactly the same procedure to add
items), the Page_Load event does not fire the second time, and the
listbox contains all the entries that it should.
This is driving me crazy! I can't understand why it sometimes does it
and sometimes does not...
I have searched newsgroups for an answer, and the majority say that
this problem is caused by setting the AutoEventWireUp page directive
attribute to true. I have checked, and it is set to false in the
control and the hosting page.
If anyone has any ideas and/or suggestion, that would be greatly
appreciated.
Thanks in advance,
David
I'm experiencing a rather strange problem:
I am coding a web application using VB.net ASP.net and Visual Studio
2003.
It's quite a large application, but the problem only occurs on one of
the Web User Controls.
This particular Web User Control has some text entry fields in it,
drop-downs etc... and a button which brings up a pop-up form.
The pop-up form is used to add a new entry into one of the listboxes
on the 'parent' form. The pop-up is a modal (created using
window.showmodaldialog), and when it's closed, the 'parent' form is
resubmitted using javascript, and the listbox repopulated to show the
newly added item(s).
All this is working fine.
However, on some occasions (and I can't work out what differences
are), when the pop-up form closes, the parent page loads and the page
events fire in the following sequence:
- Page_Load
- Page_Load checks if postback=true, then loads a listbox control with
the items that need to be in it.
- Page_Load fires again....
Now this appears to be happening randomly, and when this happens, the
listbox does not contain the newly-added entries.
On some occasions (I am doing exactly the same procedure to add
items), the Page_Load event does not fire the second time, and the
listbox contains all the entries that it should.
This is driving me crazy! I can't understand why it sometimes does it
and sometimes does not...
I have searched newsgroups for an answer, and the majority say that
this problem is caused by setting the AutoEventWireUp page directive
attribute to true. I have checked, and it is set to false in the
control and the hosting page.
If anyone has any ideas and/or suggestion, that would be greatly
appreciated.
Thanks in advance,
David