The control that triggered the UpdatePanel controls to refresh

K

Kika

Hi All,
On my page, I have a custom control in which asp server controls can be
added and a UpdatePanel to notify the server of any edit in progress in the
custom control...I would like to know which server control triggered the
postback whitin my custom control. Currently, my customControl is declared as
follow:
<daf:UpdateInProgressPanel ID="UpdateInProgressPanel1"
runat="server" DisabledStateControlId="Button1"
OnUpdateOccured="UpdateInProgressPanel1_UpdateOccured">

and the following events will trigger a postback:

document.onchange = handleEvent;
interceptor.onclick = handleEvent;
interceptor.onkeypress = handleEvent;
interceptor.onkeydown = handleEvent;
interceptor.onpaste = handleEvent;

My problem is that after postback, I would like to set the focus on the
control which triggered the post back. So far, I have used the following:
string ctrlname = page.Request.Params.Get("__EVENTTARGET");
and
if
(((ScriptManager)this.Page.FindControl("ScriptManager1")).IsInAsyncPostBack)
fromWhere =
this.Page.Request[((ScriptManager)this.Page.FindControl("ScriptManager1")).ID];
in order to get the control but i am always getting the custom control. I
want to associated postback events to the custom control only but would like
to know which control within it originated the postback...

Any help will be appreciated.

Thanks,
Kika
 

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,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top