Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
Programmatically adding triggers to an UpdatePanel - Microsoft AJAX Library and ASP.NET 2.0 AJAX Extensions - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, MonoTouch for iPhone, MonoDroid for Android, and Windows Azure.

News

Personal Blog

Work Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

Programmatically adding triggers to an UpdatePanel - Microsoft AJAX Library and ASP.NET 2.0 AJAX Extensions

If you want to add a control to fire the UpdatePanel, you have to add the trigger.  You add this through the ScriptManager control.  The method is .RegisterAsyncPostBackControl(ControlName);

I put this call in the Page_PreInit() method.  I put it there because of some other Atlas stuff was doing that needed an early place in the page lifecycle.  .RegisterAsyncPostBackControl()  will also work in the Page_Load() event. 

Original post: http://morewally.com/cs/blogs/wallym/archive/2006/09/20/359.aspx

Posted: Sep 26 2006, 11:59 AM by Wallym | with 2 comment(s)
Filed under: ,

Comments

gagan said:

code to create an update trigger using  ASP.NET 2.0 ..

...actually just want to update specified column, if the already existing value is not entered

else should not update.......

# February 28, 2008 8:35 AM

sangam100 said:

One could just do it by using AsynChronousTrigger Class:

AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();

               trigger.ControlID = mydropdownlist.ID;

               trigger.EventName = "SelectedIndexChanged";

               updateImage.Triggers.Add(trigger);

# December 17, 2008 7:57 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)