Determine which control fired a Page_Load

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.
 
A

Andrew Robinson

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.
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top