Updating contentplaceholder after initial load.....

C

chrisexv6

I have a master/content page setup on a site Im writing. In the
master page there are 3 panes...nav, content, toolbar.

The nav pane holds a bunch of search options (order number, date,
etc). The user will fill in a search field then press the appropriate
search button. The content pane is then displayed with a custom user
control that shows the search results. That control also links to an
order detail screen which then takes the place of the search results
in the same content pane. The search results and order details pages
are both content pages subscribing to the same master, and in each of
those pages are user controls for the appropriate action.

This all works perfectly fine the first time you search. But if you
are looking at details of an order and then try to search again (the
nav pane never gets hidden so search is always available), the content
pane is never updated with the new search results. Ive debugged some
of it and noticed that the search results content page page_load is
never firing that second time. In fact, the order details page_load
*is* firing, even though I should be showing search results and not
details of an order.

Am I missing something as to how I need to specify what page shows up
in the contentplaceholder? It seems that I somehow need to tell the
placeholder to reload the search results page in place of the order
details. I just havent found a way to do it (is there a way? am I
completely wrong with my implementation of master/content?)

Thanks in advance.

-Chris
 
C

chrisexv6

What seems to be happening is this:

1. Enter site, search for order number.
2. Search results show in content pane (generated by a user control)
3. Inside content pane one column is a hyperlink. That hyperlink when
clicked goes to the details content page, which changes the content
pane to show details.
4. Subsequent searches (from the left pane) just refresh the content
pane with the content that already exists.

I know that the incorrect (or at least unexpected) Page Load/init
function is being fired after the first search. Im assuming its
because the details page is in the content pane, because that also
happens to be the Page Load that is firing.

Im not sure if a multiview would work for me.....I dont know where to
put code that says "if button A is pressed from the master, run the
searchresults control methods, then display the search results
content". Once Im in the details view I seem to only have access to
methods from the details view. Ive even tried response.redirect based
on if the page was posting back. All that does is bring me to a blank
content page, because I didnt fire any events in the searchresults
control. The closest Ive gotten is adding event handlers to the
details control that refer to the events in the results control. The
problem there is that the results control has no notion of a master
page after coming from the details page. So I just get object
reference not set errors when referring to the master page values.

The fact that this isnt simple leads me to believe maybe Im
implementing the whole thing incorrectly.

-Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top