Navigation -> Open New Window Dilemma... asp.net
Posted on 2005-05-08
In my asp.net app, I am trying to open a new window from a button.click event. This new window (window#2) should be opened from my "search" webform (window#1), where the new window contains the search results.
Everytime the user updates the search criteria in window#1 and click search button I want to update window#2 with the results. (preferable without opening a window#3, rather refresh window#2 if window#2 (results page) was already open.) The way I send my search criteria to window#2 is via a session variable (sql WHERE clause)
I have tried a couple different approaches, however, none of them seems to work 100%, I need few pointers.
Here's what I tried:
1. Simplest solution seems to change a setting on my search webform to point to results page: <base target="resultspage.aspx(window#2)">
The above worked fine, however I have more than one button on my search page which performs postbacks, hence everytime a postback is performed (from a button other than search button) it would push the html from the server to window#2, I only want it to push html to window#2 when I click on the search button. Thus is there a way that I can dynamically change the target of my form server side?
Any help would be appreciated.