|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem with partial post back & master pageHi,
I have ASP.NET user control that implements ICallbackEventHandler. Partial postback works perfectly when I put control on a regular webform. But when I put it on page that has master page control doesn't work. I'm getting following error :"The target <name> for the callback could not be found or did not implement ICallbackEventHandler." It's error like when control didn't implement ICallbackEventHandler, but this one did. The only difference is when I put it on page that has master page things stop to work. Any ideas how to solve this problem is very appriciated. I'm stuck with this for days and going crazy... Thank you, s Have a tried using ASP.NET ajax.
http://ajax.asp.net/ chanmm Show quote "Samuel" <s@s.com> wrote in message news:ekeu5k$dm9$1@ss408.t-com.hr... > Hi, > > I have ASP.NET user control that implements ICallbackEventHandler. Partial > postback works perfectly when I put control on a regular webform. > But when I put it on page that has master page control doesn't work. > > I'm getting following error :"The target <name> for the callback could not > be found or did not implement ICallbackEventHandler." > > It's error like when control didn't implement ICallbackEventHandler, but > this one did. The only difference is when I put it on page that has master > page things stop to work. > > Any ideas how to solve this problem is very appriciated. I'm stuck with > this for days and going crazy... > > Thank you, > s > > I had the same problem but found the solution..
The issue I had was that in the WebForm_DoCallback in the first parameter position I was using the Control.ClientID and this is not correct as it uses the underscore as a seperator. When I use the Control.UniqueID then everything is fine as it uses the colons. I noticed this when I found that the Page.ClientScript.GetCallbackEventReference call returns a string and in the string I they use of the Control.UniqueID. This is the code I ended up with just to show the overloads I used. WebForm_DoCallback('" & Me.UniqueID & "',eventName, ClientSideAjaxCallback,srcID); Page.ClientScript.GetCallbackEventReference(Me, "", "ClientSideAjaxCallback", "", False) David Rehagen Show quote "Samuel" wrote: > Hi, > > I have ASP.NET user control that implements ICallbackEventHandler. Partial > postback works perfectly when I put control on a regular webform. > But when I put it on page that has master page control doesn't work. > > I'm getting following error :"The target <name> for the callback could not > be found or did not implement ICallbackEventHandler." > > It's error like when control didn't implement ICallbackEventHandler, but > this one did. The only difference is when I put it on page that has master > page things stop to work. > > Any ideas how to solve this problem is very appriciated. I'm stuck with this > for days and going crazy... > > Thank you, > s > > > |
|||||||||||||||||||||||