M
matt.grande
Please, I REALLY need help with this one. I've been banging my head
about it for three days now.
Here's the situation.
I have a form that runs some queries and functions and such. When all
is said and done, there are several new controls (LinkButtons) on the
page. Dynamicly created controls MUST be created in the Page_Load.
Now, if I click one of the LinkButtons, the page attempts to reload
before calling the button's EventHandler. This causes the
above-mentioned function to go again, before the EventHandler is
called. This causes an unnecessary slow-down.
I need to find a way to skip over the method. The best solution I've
been able to come up with is as follows:
One would think that it would work fine, but for whatever reason, if
the "if" statement is false, the EventHandler doesn't get called.
I'm at my wits end here. Any help would be greatly appreciated.
about it for three days now.
Here's the situation.
I have a form that runs some queries and functions and such. When all
is said and done, there are several new controls (LinkButtons) on the
page. Dynamicly created controls MUST be created in the Page_Load.
Now, if I click one of the LinkButtons, the page attempts to reload
before calling the button's EventHandler. This causes the
above-mentioned function to go again, before the EventHandler is
called. This causes an unnecessary slow-down.
I need to find a way to skip over the method. The best solution I've
been able to come up with is as follows:
Code:
string et = Request.Form["__EVENTTARGET"];
if ((IsPostBack) && (et == ""))
ExecuteCustomSearch();
One would think that it would work fine, but for whatever reason, if
the "if" statement is false, the EventHandler doesn't get called.
I'm at my wits end here. Any help would be greatly appreciated.