Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 17th, 2008, 01:13 PM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default The control that triggered the UpdatePanel control

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_UpdateOccu red">

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("ScriptMana ger1")).IsInAsyncPostBack)
                fromWhere = this.Page.Request[((ScriptManager)this.Page.FindControl("ScriptManag er1")).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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put a button control in a GridView control ryan.webb ASP.NET 2.0 Basics 2 December 28th, 2007 05:26 AM
Can't move focus to control <control scptech Access VBA 8 October 26th, 2007 12:16 PM
event triggered when any control changed hoen Access VBA 7 January 24th, 2006 01:44 PM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
Help with control initialization in user control mike_remember ASP.NET 1.0 and 1.1 Professional 7 December 19th, 2005 11:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.