Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:42 PM.


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