Saturday, March 24, 2012

ModalPopExtender DynamicServiceMethod with Master Page

If I place this in a <asp:content> on master page:

<asp:linkbutton runat="server" id="testLB" text="test" />
<atk:ModalPopupExtender runat="server" ID="mpuNotes" TargetControlID="testLB" PopupControlID="panmpu"
BackgroundCssClass="modalBackground" DropShadow="true" OkControlID="mpubutOk"
DynamicControlID="panNote" DynamicServiceMethod="GetNote">
</atk:ModalPopupExtender>
<asp:panel runat="server" id="panmpu" cssclass="modalPopup">
Davs
<asp:Panel runat="server" ID="panNote" />
<asp:Button runat="server" ID="mpubutOk" Text="Close" />
</asp:panel>

And the codefile looks like this:

[System.Web.Services.WebMethod]
public static string GetNote()
{
return "Hello - CodeFile";
}

The method is NOT called, but when moving it on a normal webform, it works. How to get it to work in a master page?


Looks like the ScriptService method is missing:http://blogs.msdn.com/sburke/archive/2006/10/21/hint-components-that-use-web-services-with-asp-net-ajax-v1-0-beta.aspx

No comments:

Post a Comment