Having a similar problem - update panel in one content area and trigger in another. Wrapping the two content panes in a update panel in the master page did not work for me (though it did not give me an error, the entire page refreshed instead of just the
panel) - in any case I wanted this to work on the page level as i have pages which do not use this scheme. After much trolling and trial and error a combination of methods worked for me - the trick is to add the control to the update panel trigger collection
on Page_Init using the controls UniqueId property - like so -
Pluginbaby
Contributor
2961 Points
486 Posts
MVP
Re: Can an Update Panel trigger on a control in a different Content area?
Jan 13, 2007 02:20 PM|LINK
Hi,
I think it's ok for MultiView, anyway if you put the ContentTemplate inside an UP in MasterPage, you should read this :
http://odetocode.com/Blogs/scott/archive/2007/01/03/9682.aspx
Laurent Duveau
MVP / MCT / RD
http://weblogs.asp.net/lduveau/
evaleah
Member
46 Points
52 Posts
Re: Can an Update Panel trigger on a control in a different Content area?
Oct 13, 2008 08:06 PM|LINK
THANK YOU!!!!!
naveen.gummu...
Participant
926 Points
152 Posts
Re: Can an Update Panel trigger on a control in a different Content area?
Oct 14, 2008 07:55 AM|LINK
hi
you can give the id from the viewsource <input name="ClinetSideControlName" whatever the controlid rendered in viewsource give it in the
apt.ControlId = "ClinetSideControlName";
brahmaIndia
Member
2 Points
1 Post
Re: Can an Update Panel trigger on a control in a different Content area?
Aug 18, 2010 08:03 PM|LINK
Having a similar problem - update panel in one content area and trigger in another. Wrapping the two content panes in a update panel in the master page did not work for me (though it did not give me an error, the entire page refreshed instead of just the panel) - in any case I wanted this to work on the page level as i have pages which do not use this scheme. After much trolling and trial and error a combination of methods worked for me - the trick is to add the control to the update panel trigger collection on Page_Init using the controls UniqueId property - like so -
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">public partial class history : System.Web.UI.Page</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">{</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> protected void Page_Init(object sender, EventArgs e)</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> {</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> AsyncPostBackTrigger start = new AsyncPostBackTrigger();</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> start.ControlID = btnReset.UniqueID;</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> start.EventName = "Click";</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> UpdatePanel1.Triggers.Add(start);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> AsyncPostBackTrigger begin = new AsyncPostBackTrigger();</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> begin.ControlID = btnBeg.UniqueID;</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> begin.EventName = "Click";</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> UpdatePanel1.Triggers.Add(begin);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> }</div>public partial class
public partial class history : System.Web.UI.Page
{
protected void Page_Init(object sender, EventArgs e)
{
AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
trigger.ControlID = btnTrigger.UniqueID;
trigger.EventName = "Click";
UpdatePanel1.Triggers.Add(trigger);
}
This works fine for me - hope it helps someone else having the same problem.
"Trigger" "update Panel" Content Template