Determine which control fired a Page_Load

  • Thread starter Thread starter matt.grande
  • Start date Start date
M

matt.grande

I know this question has been asked on here before a few times, but
none of those results suit my needs. Here's my situation.

I have a search form. When I click the submit button, the query is run
and, based on this query, links to a "results" page are placed on my
form. This HAS to be done in the Page_Load method, otherwise the
EventHandler won't work.

Now, whenever I click one of the links that were dynamicly created, I
want it to call a method to set up some things before calling the next
page.

Unfortunately, the Page_Load is called before the EventHandler, and in
some cases, the query takes some time to complete. This is
unacceptable.

I would like to be able to either:
a) Check to see which control caused the Page_Load, or
b) Learn of another way to do this.

Any help would be appreciated.
 
How about using the Command event along with the Command Name and Argument
on any of the Button controls? You have one event handler but pass different
names and or arguments.
 
Back
Top