A
Adam Clauss
I have a webapp which consists of several different webforms.
Basically:
(1) view the contents of a database
(2) one is to add a new entry
(3) confirms the new entry.
The third form, upon confirming the entry (in a button_clicked handler) adds
the entry into the database and then redirects back to (2) using
Response.Redirect(..)
However, I've recently run into a problem - for some reason the Page_Load in
(2) is not getting called. At all. I noticed it first when I added the
redirect from (3). That redirects and adds a URL parameter
("event.aspx?added=true"). In the Page_Load of (2), I added a conditional
that "if (Request.QueryString["added"] == "true")" then a hidden-by-default
label field gets its Visibility set to true (says "Successfully added").
However, nothing happened - the page loaded as normal, without the new
label.
To test my sanity, I added Response.Redirect("www.yahoo.com", true) as the
very first line in Page_Load (not under any conditional - it should happen
everytime). Did a complete rebuild of the application, cleared IE cache,
and directed it to my page. Still loaded as normal - no redirect to yahoo.
Other events on the page (like the form submit button) work fine - it
correctly validates the data (or shows another hidden label if data was
invalid). Page_Load just seems like it is not triggering at all. Any ideas
on what might be happening?
Thanks!
Adam Clauss
(e-mail address removed)
Basically:
(1) view the contents of a database
(2) one is to add a new entry
(3) confirms the new entry.
The third form, upon confirming the entry (in a button_clicked handler) adds
the entry into the database and then redirects back to (2) using
Response.Redirect(..)
However, I've recently run into a problem - for some reason the Page_Load in
(2) is not getting called. At all. I noticed it first when I added the
redirect from (3). That redirects and adds a URL parameter
("event.aspx?added=true"). In the Page_Load of (2), I added a conditional
that "if (Request.QueryString["added"] == "true")" then a hidden-by-default
label field gets its Visibility set to true (says "Successfully added").
However, nothing happened - the page loaded as normal, without the new
label.
To test my sanity, I added Response.Redirect("www.yahoo.com", true) as the
very first line in Page_Load (not under any conditional - it should happen
everytime). Did a complete rebuild of the application, cleared IE cache,
and directed it to my page. Still loaded as normal - no redirect to yahoo.
Other events on the page (like the form submit button) work fine - it
correctly validates the data (or shows another hidden label if data was
invalid). Page_Load just seems like it is not triggering at all. Any ideas
on what might be happening?
Thanks!
Adam Clauss
(e-mail address removed)